forked from boostorg/container
Modify flat associative containers to be adaptors if the allocator argument is a container. This allows using stable_vector, small_vector, static_vector as underlying containers.
This commit is contained in:
@@ -113,6 +113,8 @@ class static_vector
|
||||
template<class U, std::size_t OtherCapacity>
|
||||
friend class static_vector;
|
||||
|
||||
public:
|
||||
typedef container_detail::static_storage_allocator<Value, Capacity> allocator_type;
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
public:
|
||||
@@ -252,6 +254,19 @@ public:
|
||||
: base_t(other)
|
||||
{}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static_vector(static_vector const& other, const allocator_type &)
|
||||
: base_t(other)
|
||||
{}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static_vector(BOOST_RV_REF(static_vector) other, const allocator_type &)
|
||||
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<value_type>::value)
|
||||
: base_t(BOOST_MOVE_BASE(base_t, other))
|
||||
{}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE explicit static_vector(const allocator_type &)
|
||||
: base_t()
|
||||
{}
|
||||
|
||||
//! @pre <tt>other.size() <= capacity()</tt>.
|
||||
//!
|
||||
//! @brief Constructs a copy of other static_vector.
|
||||
|
||||
Reference in New Issue
Block a user