summaryrefslogtreecommitdiffstats
path: root/libcxx/include/ext/hash_map
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-02-10 20:46:23 +0000
committerEric Fiselier <eric@efcs.ca>2016-02-10 20:46:23 +0000
commit75d0dcfde74dcdb2aacfbfa0a52d8bf72416336b (patch)
tree516f774dc7c88233dfdd5456b3db382b8bc2d64d /libcxx/include/ext/hash_map
parentd8a985ec7ce0d6a5d0baa9bfc0ed421e5c3eaf02 (diff)
downloadbcm5719-llvm-75d0dcfde74dcdb2aacfbfa0a52d8bf72416336b.tar.gz
bcm5719-llvm-75d0dcfde74dcdb2aacfbfa0a52d8bf72416336b.zip
Recommit r260012 - Cleanup node-type handling in the unordered containers.
This time I kept <ext/hash_map> working! 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 bugs and problems. llvm-svn: 260431
Diffstat (limited to 'libcxx/include/ext/hash_map')
-rw-r--r--libcxx/include/ext/hash_map2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/ext/hash_map b/libcxx/include/ext/hash_map
index 3ac27b2ca33..38866531333 100644
--- a/libcxx/include/ext/hash_map
+++ b/libcxx/include/ext/hash_map
@@ -309,7 +309,7 @@ class __hash_map_node_destructor
{
typedef _Alloc allocator_type;
typedef allocator_traits<allocator_type> __alloc_traits;
- typedef typename __alloc_traits::value_type::value_type value_type;
+ typedef typename __alloc_traits::value_type::__node_value_type value_type;
public:
typedef typename __alloc_traits::pointer pointer;
private:
OpenPOWER on IntegriCloud