diff options
Diffstat (limited to 'libcxx/include/map')
-rw-r--r-- | libcxx/include/map | 6 |
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> { |