Cleanup node-type handling in the associative containers.
authorEric Fiselier <eric@efcs.ca>
Sat, 20 Feb 2016 05:28:30 +0000 (05:28 +0000)
committerEric Fiselier <eric@efcs.ca>
Sat, 20 Feb 2016 05:28:30 +0000 (05:28 +0000)
commit089a7cc5dea665f4088ed6b587e2f6ea058d7581
tree31f84aed9c61ccae7c04658cf8622e907b69d0d7
parent74caaf27d8ea8f82f6020d51a2df7d92a3b558e7
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
libcxx/include/__tree
libcxx/include/map
libcxx/test/libcxx/containers/associative/tree_key_value_traits.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/iterator_types.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/map/incomplete_type.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/multimap/incomplete_type.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/multiset/incomplete_type.pass.cpp [new file with mode: 0644]
libcxx/test/std/containers/associative/set/incomplete_type.pass.cpp [new file with mode: 0644]