First half of C++17's splicing maps and sets
authorErik Pilkington <erik.pilkington@gmail.com>
Wed, 1 Aug 2018 01:33:38 +0000 (01:33 +0000)
committerErik Pilkington <erik.pilkington@gmail.com>
Wed, 1 Aug 2018 01:33:38 +0000 (01:33 +0000)
commitb0386a515b60c2f43eaaef986bd5b1cdc4448244
treebf43e7a1f1c135df7a7873d08381e77c70c1416e
parent9057546c5bf2015414186c1a1f0660cd32344362
First half of C++17's splicing maps and sets

This commit adds a node handle type, (located in __node_handle), and adds
extract() and insert() members to all map and set types, as well as their
implementations in __tree and __hash_table.

The second half of this feature is adding merge() members, which splice nodes
in bulk from one container into another. This will be committed in a follow-up.

Differential revision: https://reviews.llvm.org/D46845

llvm-svn: 338472
43 files changed:
libcxx/include/CMakeLists.txt
libcxx/include/__hash_table
libcxx/include/__node_handle [new file with mode: 0644]
libcxx/include/__tree
libcxx/include/map
libcxx/include/module.modulemap
libcxx/include/set
libcxx/include/unordered_map
libcxx/include/unordered_set
libcxx/test/std/containers/associative/map/map.modifiers/extract_iterator.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/map/map.modifiers/extract_key.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/map/map.modifiers/insert_node_type.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/map/map.modifiers/insert_node_type_hint.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_iterator.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_key.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_node_type.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_node_type_hint.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/multiset/extract_iterator.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/multiset/extract_key.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/multiset/insert_node_type.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/multiset/insert_node_type_hint.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/set/extract_iterator.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/set/extract_key.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/set/insert_node_type.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/set/insert_node_type_hint.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/container.node/node_handle.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_iterator.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_key.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_node_type.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_node_type_hint.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_iterator.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_key.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_node_type.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_node_type_hint.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/unord/unord.multiset/extract_iterator.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/unord/unord.multiset/extract_key.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/unord/unord.multiset/insert_node_type.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/unord/unord.multiset/insert_node_type_hint.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/unord/unord.set/extract_iterator.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/unord/unord.set/extract_key.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/unord/unord.set/insert_node_type.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/unord/unord.set/insert_node_type_hint.pass.cpp [new file with mode: 0644]
libcxx/test/support/Counter.h