summaryrefslogtreecommitdiffstats
path: root/libcxx/include/map
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/map')
-rw-r--r--libcxx/include/map6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcxx/include/map b/libcxx/include/map
index 561c3ddc93d..adfb4cdb5e9 100644
--- a/libcxx/include/map
+++ b/libcxx/include/map
@@ -840,6 +840,9 @@ public:
typedef value_type& reference;
typedef const value_type& const_reference;
+ static_assert((is_same<typename allocator_type::value_type, value_type>::value),
+ "Allocator::value_type must be same type as value_type");
+
class _LIBCPP_TYPE_VIS_ONLY value_compare
: public binary_function<value_type, value_type, bool>
{
@@ -1696,6 +1699,9 @@ public:
typedef value_type& reference;
typedef const value_type& const_reference;
+ static_assert((is_same<typename allocator_type::value_type, value_type>::value),
+ "Allocator::value_type must be same type as value_type");
+
class _LIBCPP_TYPE_VIS_ONLY value_compare
: public binary_function<value_type, value_type, bool>
{
OpenPOWER on IntegriCloud