hanchenye-llvm-project/libcxx
Eric Fiselier 1b2e4ffa58 Cleanup node-type handling in the unordered containers
This patch is the first in a series of patches that's meant to better
support unordered_map. unordered_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 __hash_table about this
special value_type.

This patch creates a "__hash_node_types" traits class that contains
all of the typedefs needed by the unordered containers and it's iterators.
These typedefs include ones for each node type and  node pointer type,
as well as special typedefs for "unordered_map"'s value type.

As a result of this change all of the unordered containers now all support
incomplete types.

As a drive-by fix I changed the difference_type in __hash_table to always
be ptrdiff_t. There is a corresponding change to size_type but it cannot
take affect until an ABI break.

This patch will be followed up shortly with fixes for various unordered_map
fixes.

llvm-svn: 260012
2016-02-07 00:36:33 +00:00
..
cmake Fix the search path for CMake files 2016-02-04 23:17:20 +00:00
docs [docs] Remove references to autoconf build. 2016-01-30 01:11:42 +00:00
include Cleanup node-type handling in the unordered containers 2016-02-07 00:36:33 +00:00
lib [libcxx] Remove -Wpadded from buildit script. 2016-01-27 01:55:11 +00:00
src [libcxx] Whitelist inclusion of sysctl.h instead of blacklisting 2016-01-29 13:53:23 +00:00
test Cleanup node-type handling in the unordered containers 2016-02-07 00:36:33 +00:00
utils Add more missing license headers 2016-01-19 21:58:49 +00:00
www Implement LWG#2385; remove the allocator-aware std::function::assign call. It was useless, and didn't actually *do anything* with the allocator. Now it's gone. On the off chance that someone is mistakenly calling it, it's only gone in C++1z 2016-01-25 17:29:55 +00:00
.arcconfig
.gitignore [libc++] Refactor test components into modules. 2015-01-09 18:03:29 +00:00
CMakeLists.txt Revert r256606 due to compiler-rt sanitizer bot failures 2015-12-30 03:39:03 +00:00
CREDITS.TXT Add self to CREDITS.txt 2015-02-26 00:48:22 +00:00
LICENSE.TXT Update copyright year to 2015. 2015-03-12 20:13:11 +00:00
TODO.TXT Test commit to see if libcxx.llvm.org/docs builds 2015-09-04 22:57:00 +00:00