diff options
Diffstat (limited to 'include/set')
| -rw-r--r-- | include/set | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/set b/include/set index 9d64a521da11..ac69e085241f 100644 --- a/include/set +++ b/include/set @@ -409,6 +409,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"); + private: typedef __tree<value_type, value_compare, allocator_type> __base; typedef allocator_traits<allocator_type> __alloc_traits; @@ -819,6 +822,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"); + private: typedef __tree<value_type, value_compare, allocator_type> __base; typedef allocator_traits<allocator_type> __alloc_traits; |
