summaryrefslogtreecommitdiffstats
path: root/libcxx/include/__hash_table
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2016-06-30 15:11:53 +0000
committerMarshall Clow <mclow.lists@gmail.com>2016-06-30 15:11:53 +0000
commit497677449be6f4a19b6b692dccab3b23e7cfd872 (patch)
treec194cf777fd0b44f992ab9b96d8406aa7f212ef5 /libcxx/include/__hash_table
parent2d1938be0d21f0e4c8b79db722b361969d90538a (diff)
downloadbcm5719-llvm-497677449be6f4a19b6b692dccab3b23e7cfd872.tar.gz
bcm5719-llvm-497677449be6f4a19b6b692dccab3b23e7cfd872.zip
Implement LWG#2436: 'Comparators for associative containers should always be CopyConstructible'
llvm-svn: 274235
Diffstat (limited to 'libcxx/include/__hash_table')
-rw-r--r--libcxx/include/__hash_table4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table
index 13ab928e16f..86cd9315dd7 100644
--- a/libcxx/include/__hash_table
+++ b/libcxx/include/__hash_table
@@ -938,6 +938,10 @@ private:
typedef allocator_traits<__node_base_allocator> __node_base_traits;
static_assert((is_same<__node_base_pointer, typename __node_base_traits::pointer>::value),
"Allocator does not rebind pointers in a sane manner.");
+ static_assert((is_copy_constructible<key_equal>::value),
+ "Predicate must be copy-constructible.");
+ static_assert((is_copy_constructible<hasher>::value),
+ "Hasher must be copy-constructible.");
private:
OpenPOWER on IntegriCloud