summaryrefslogtreecommitdiffstats
path: root/libcxx/include/forward_list
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/forward_list')
-rw-r--r--libcxx/include/forward_list3
1 files changed, 3 insertions, 0 deletions
diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list
index 8a87fc5e1f2..adbc32cf861 100644
--- a/libcxx/include/forward_list
+++ b/libcxx/include/forward_list
@@ -537,6 +537,9 @@ public:
typedef _Tp value_type;
typedef _Alloc allocator_type;
+ static_assert((is_same<typename allocator_type::value_type, value_type>::value),
+ "Allocator::value_type must be same type as value_type");
+
typedef value_type& reference;
typedef const value_type& const_reference;
typedef typename allocator_traits<allocator_type>::pointer pointer;
OpenPOWER on IntegriCloud