summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/containers/associative/multimap
Commit message (Collapse)AuthorAgeFilesLines
...
* Make the comparison objects that we pass in for various tests look more like ↵Marshall Clow2016-06-095-5/+6
| | | | | | actual comparison objects. No functional change. llvm-svn: 272288
* Avoid Shadowing warnings in the associative containers tests. Thanks to STL ↵Marshall Clow2016-06-071-2/+2
| | | | | | for the patch. llvm-svn: 272018
* [libcxx] Fix c++98 test failures.Asiri Rathnayake2016-06-035-5/+5
| | | | | | | | | Adds XFAIL/UNSUPPORTED lit tags as appropriate. Gets a clean test run for -std=c++98 on Fedora 20. NFC. llvm-svn: 271741
* Remove trailing whitespace in test suite. Approved by Marshall Clow.Eric Fiselier2016-06-0122-68/+68
| | | | llvm-svn: 271435
* Complete LWG issue #2016. Allocators must be nothrow swappableEric Fiselier2016-04-221-3/+3
| | | | llvm-svn: 267085
* Fix LWG issue 2345 - Add insert(value_type&&)Eric Fiselier2016-04-185-220/+152
| | | | llvm-svn: 266585
* Extract key to avoid preemptive mallocs in insert/emplace in associative ↵Eric Fiselier2016-04-151-78/+2
| | | | | | | | | | | | | | containers Summary: This patch applies Duncan's work on __hash_table to __tree. Reviewers: mclow.lists, dexonsmith Subscribers: dexonsmith, cfe-commits Differential Revision: http://reviews.llvm.org/D18637 llvm-svn: 266491
* Teach __tree how to handle map's __value_typeEric Fiselier2016-03-311-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is fairly large and contains a number of changes. The changes all work towards allowing __tree to properly handle __value_type esspecially when inserting into the __tree. I chose not to break this change into smaller patches because it wouldn't be possible to write meaningful standard-compliant tests for each patch. It is very similar to r260513 "[libcxx] Teach __hash_table how to handle unordered_map's __hash_value_type". Changes in <map> * Remove __value_type's constructors because it should never be constructed directly. * Make map::emplace and multimap::emplace forward to __tree and remove the old definitions * Remove "__construct_node" map and multimap member functions. Almost all of the construction is done within __tree. * Fix map's move constructor to access "__value_type.__nc" directly and pass this object to __tree::insert. Changes in <__tree> * Add traits to detect, handle, and unwrap, map's "__value_type". * Convert methods taking "value_type" to take "__container_value_type" instead. Previously these methods caused unwanted implicit conversions from "std::pair<Key, Value>" to "__value_type<Key, Value>". * Delete __tree_node and __tree_node_base's constructors and assignment operators. The node types should never be constructed because the "__value_" member of __tree_node must be constructed directly by the allocator. * Make the __tree_node_destructor class and "__construct_node" methods unwrap "__node_value_type" into "__container_value_type" before invoking the allocator. The user's allocator can only be used to construct and destroy the container's value_type. Passing it map's "__value_type" was incorrect. * Cleanup the "__insert" and "__emplace" methods. Have __insert forward to an __emplace function wherever possible to reduce code duplication. __insert_unique(value_type const&) and __insert_unique(value_type&&) forward to __emplace_unique_key_args. These functions will not allocate a new node if the value is already in the tree. * Change the __find* functions to take the "key_type" directly instead of passing in "value_type" and unwrapping the key later. This change allows the find functions to be used without having to construct a "value_type" first. This allows for a number of optimizations. * Teach __move_assign and __assign_multi methods to unwrap map's __value_type. llvm-svn: 264986
* Cleanup node-type handling in the associative containers.Eric Fiselier2016-02-201-0/+29
| | | | | | | | | | | | | | | | | | | | | | | 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
* Add explicit include directives; the file was getting implicitly included ↵Marshall Clow2016-01-052-0/+2
| | | | | | already. NFC llvm-svn: 256864
* First half of LWG#2354: 'Unnecessary copying when inserting into maps with ↵Marshall Clow2016-01-052-2/+63
| | | | | | braced-init syntax' llvm-svn: 256859
* Add static_assert to set/multiset/map/multimap/forward_list/deque that the ↵Marshall Clow2015-11-261-0/+18
| | | | | | 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
* Remove undefined behavior from tests; specifically, ensure that the value ↵Marshall Clow2015-11-245-15/+20
| | | | | | type of the allocators match the value type of the containers llvm-svn: 254030
* Fix warnings in array and assoc containersEric Fiselier2015-07-181-0/+1
| | | | llvm-svn: 242629
* Implement the first part of N4258: 'Cleaning up noexcept in the Library'. ↵Marshall Clow2015-07-131-0/+88
| | | | | | This patch deals with swapping containers, and implements a more strict noexcept specification (a conforming extension) than the standard mandates. llvm-svn: 242056
* Add tests for LWG#2299. While doing so, I noticed that the tests we have for ↵Marshall Clow2015-06-3025-1/+832
| | | | | | 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
* Fix for LWG Issue 2059: C++0x ambiguity problem with map::eraseMarshall Clow2015-05-101-0/+22
| | | | llvm-svn: 236950
* Allow declaration of map and multimap iterator with incomplete mapped type. ↵Eric Fiselier2015-03-031-0/+29
| | | | | | Patch from eugenis llvm-svn: 231119
* Remove use of zero length arrays in tests. Get tests passing with ↵Eric Fiselier2015-02-102-64/+16
| | | | | | -pedantic-errors llvm-svn: 228706
* We had two identical files named 'MoveOnly.h' in the test suite. Move one to ↵Marshall Clow2015-01-289-9/+9
| | | | | | support/, remove the other, and update all the tests that included them. No functionality change. llvm-svn: 227370
* Fix PR22366. When move-constructing an associative container and explicitly ↵Marshall Clow2015-01-281-0/+48
| | | | | | passing an allocator that compares different, we were not calling the destructor of the elements in the moved-from container. llvm-svn: 227359
* Move test into test/std subdirectory.Eric Fiselier2014-12-2047-0/+5455
llvm-svn: 224658
OpenPOWER on IntegriCloud