Eric Fiselier
089a7cc5de
Cleanup node-type handling in the associative containers.
...
This patch is very similar to r260431.
This patch is the first in a series of patches that's meant to better
support map. map has a special "value_type" that
differs from pair<const Key, Value>. In order to meet the EmplaceConstructible
and CopyInsertable requirements we need to teach __tree about this
special value_type.
This patch creates a "__tree_node_types" traits class that contains
all of the typedefs needed by the associative containers and their iterators.
These typedefs include ones for each node type and node pointer type,
as well as special typedefs for "map"'s value type.
Although the associative containers already supported incomplete types, this
patch makes it official by adding tests.
This patch will be followed up shortly with various cleanups within __tree and
fixes for various map bugs and problems.
llvm-svn: 261416
2016-02-20 05:28:30 +00:00
Marshall Clow
652a2ce191
Add explicit include directives; the file was getting implicitly included already. NFC
...
llvm-svn: 256864
2016-01-05 19:53:31 +00:00
Marshall Clow
afc9ff99ec
First half of LWG#2354: 'Unnecessary copying when inserting into maps with braced-init syntax'
...
llvm-svn: 256859
2016-01-05 19:32:41 +00:00
Marshall Clow
94f89aeec5
Add static_assert to set/multiset/map/multimap/forward_list/deque that the allocator's value_type match the container's value_type. vector/unordered/list/string already do this. Add tests for all the containers to verify this.
...
llvm-svn: 254119
2015-11-26 01:24:04 +00:00
Marshall Clow
e0312a3047
Remove undefined behavior from tests; specifically, ensure that the value type of the allocators match the value type of the containers
...
llvm-svn: 254030
2015-11-24 22:10:51 +00:00
Eric Fiselier
2decfad7c5
Fix warnings in array and assoc containers
...
llvm-svn: 242629
2015-07-18 23:56:04 +00:00
Marshall Clow
e3fbe1433b
Implement the first part of N4258: 'Cleaning up noexcept in the Library'. This patch deals with swapping containers, and implements a more strict noexcept specification (a conforming extension) than the standard mandates.
...
llvm-svn: 242056
2015-07-13 20:04:56 +00:00
Marshall Clow
f8457a0735
Add tests for LWG#2299. While doing so, I noticed that the tests we have for the transparent comparators don't actually call them. Fix those tests, too. Now one of them is failing, due to a missing const in <map>. Add that (twice). Next step is to do the same for <unordered_map>
...
llvm-svn: 241091
2015-06-30 18:15:41 +00:00
Marshall Clow
ec39296875
Fix for LWG Issue 2059: C++0x ambiguity problem with map::erase
...
llvm-svn: 236950
2015-05-10 13:35:00 +00:00
Eric Fiselier
b3be398c67
Allow declaration of map and multimap iterator with incomplete mapped type. Patch from eugenis
...
llvm-svn: 231119
2015-03-03 20:10:01 +00:00
Eric Fiselier
8f55e62990
Remove use of zero length arrays in tests. Get tests passing with -pedantic-errors
...
llvm-svn: 228706
2015-02-10 16:51:29 +00:00
Marshall Clow
949389c395
We had two identical files named 'MoveOnly.h' in the test suite. Move one to support/, remove the other, and update all the tests that included them. No functionality change.
...
llvm-svn: 227370
2015-01-28 21:22:53 +00:00
Marshall Clow
d5f461ca03
Fix PR22366. When move-constructing an associative container and explicitly passing an allocator that compares different, we were not calling the destructor of the elements in the moved-from container.
...
llvm-svn: 227359
2015-01-28 19:54:25 +00:00
Eric Fiselier
5a83710e37
Move test into test/std subdirectory.
...
llvm-svn: 224658
2014-12-20 01:40:03 +00:00