mirror of
https://github.com/boostorg/container.git
synced 2025-08-02 05:54:28 +02:00
Fixes #243 ("rebind makes build fail in boost::small_vector with libstdc++-13 and later ")
This commit is contained in:
@@ -345,17 +345,17 @@ class small_vector_base
|
|||||||
public:
|
public:
|
||||||
//Make it public as it will be inherited by small_vector and container
|
//Make it public as it will be inherited by small_vector and container
|
||||||
//must have this public member
|
//must have this public member
|
||||||
typedef typename real_allocator<T, SecAlloc>::type secondary_allocator_t;
|
typedef typename real_allocator<T, SecAlloc>::type allocator_type;
|
||||||
typedef typename allocator_traits<secondary_allocator_t>::
|
typedef typename allocator_traits<allocator_type>::
|
||||||
template portable_rebind_alloc<void>::type void_allocator_t;
|
template portable_rebind_alloc<void>::type void_allocator_t;
|
||||||
typedef typename dtl::get_small_vector_opt<Options>::type options_t;
|
typedef typename dtl::get_small_vector_opt<Options>::type options_t;
|
||||||
typedef typename dtl::vector_for_small_vector
|
typedef typename dtl::vector_for_small_vector
|
||||||
<T, SecAlloc, Options>::type base_type;
|
<T, SecAlloc, Options>::type base_type;
|
||||||
typedef typename allocator_traits<secondary_allocator_t>::pointer pointer;
|
typedef typename allocator_traits<allocator_type>::pointer pointer;
|
||||||
typedef typename allocator_traits<secondary_allocator_t>::const_pointer const_pointer;
|
typedef typename allocator_traits<allocator_type>::const_pointer const_pointer;
|
||||||
typedef typename allocator_traits<secondary_allocator_t>::void_pointer void_pointer;
|
typedef typename allocator_traits<allocator_type>::void_pointer void_pointer;
|
||||||
typedef typename allocator_traits<secondary_allocator_t>::const_void_pointer const_void_pointer;
|
typedef typename allocator_traits<allocator_type>::const_void_pointer const_void_pointer;
|
||||||
typedef small_vector_allocator<T, void_allocator_t, Options> allocator_type;
|
typedef small_vector_allocator<T, void_allocator_t, Options> small_allocator_type;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BOOST_COPYABLE_AND_MOVABLE(small_vector_base)
|
BOOST_COPYABLE_AND_MOVABLE(small_vector_base)
|
||||||
@@ -420,9 +420,9 @@ class small_vector_base
|
|||||||
|
|
||||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||||
protected:
|
protected:
|
||||||
void move_construct_impl(base_type &x, const allocator_type &a)
|
void move_construct_impl(base_type &x)
|
||||||
{
|
{
|
||||||
if(base_type::is_propagable_from(x.get_stored_allocator(), x.data(), a, true)){
|
if(base_type::is_propagable_from(x.get_stored_allocator(), x.data(), this->base_type::get_stored_allocator(), true)){
|
||||||
this->steal_resources(x);
|
this->steal_resources(x);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -622,16 +622,16 @@ class small_vector
|
|||||||
|
|
||||||
BOOST_CONTAINER_FORCEINLINE explicit small_vector(BOOST_RV_REF(base_type) other)
|
BOOST_CONTAINER_FORCEINLINE explicit small_vector(BOOST_RV_REF(base_type) other)
|
||||||
: base_type(initial_capacity_t(), internal_capacity(), ::boost::move(other.get_stored_allocator()))
|
: base_type(initial_capacity_t(), internal_capacity(), ::boost::move(other.get_stored_allocator()))
|
||||||
{ this->move_construct_impl(other, other.get_stored_allocator()); }
|
{ this->base_type::move_construct_impl(other); }
|
||||||
|
|
||||||
BOOST_CONTAINER_FORCEINLINE small_vector(BOOST_RV_REF(small_vector) other)
|
BOOST_CONTAINER_FORCEINLINE small_vector(BOOST_RV_REF(small_vector) other)
|
||||||
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<value_type>::value)
|
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<value_type>::value)
|
||||||
: base_type(initial_capacity_t(), internal_capacity(), ::boost::move(other.get_stored_allocator()))
|
: base_type(initial_capacity_t(), internal_capacity(), ::boost::move(other.get_stored_allocator()))
|
||||||
{ this->move_construct_impl(other, other.get_stored_allocator()); }
|
{ this->base_type::move_construct_impl(other); }
|
||||||
|
|
||||||
BOOST_CONTAINER_FORCEINLINE small_vector(BOOST_RV_REF(small_vector) other, const allocator_type &a)
|
BOOST_CONTAINER_FORCEINLINE small_vector(BOOST_RV_REF(small_vector) other, const allocator_type &a)
|
||||||
: base_type(initial_capacity_t(), internal_capacity(), a)
|
: base_type(initial_capacity_t(), internal_capacity(), a)
|
||||||
{ this->move_construct_impl(other, a); }
|
{ this->base_type::move_construct_impl(other); }
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||||
BOOST_CONTAINER_FORCEINLINE small_vector(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
|
BOOST_CONTAINER_FORCEINLINE small_vector(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
|
||||||
|
Reference in New Issue
Block a user