forked from boostorg/container
Add compile-time check to make sure allocator_type::value_type and container's value_type are the same type.
This commit is contained in:
@@ -628,6 +628,11 @@ class basic_string
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
private:
|
||||
|
||||
//`allocator_type::value_type` must match container's `value type`. If this
|
||||
//assertion fails, please review your allocator definition.
|
||||
BOOST_CONTAINER_STATIC_ASSERT((dtl::is_same<value_type, typename allocator_traits<allocator_type>::value_type>::value));
|
||||
|
||||
typedef constant_iterator<CharT> cvalue_iterator;
|
||||
typedef typename base_t::alloc_version alloc_version;
|
||||
typedef ::boost::intrusive::pointer_traits<pointer> pointer_traits;
|
||||
|
||||
Reference in New Issue
Block a user