mirror of
https://github.com/boostorg/container.git
synced 2025-08-02 05:54:28 +02:00
Remove BOOST_MOVABLE_BUT_NOT_COPYABLE from basic_string_base as it comflicts with is_copy_constructible and other utilities that inspect the internal tag looking for noncopyable types.
This commit is contained in:
@@ -67,11 +67,12 @@ namespace container_detail {
|
||||
template <class Allocator>
|
||||
class basic_string_base
|
||||
{
|
||||
BOOST_MOVABLE_BUT_NOT_COPYABLE(basic_string_base)
|
||||
basic_string_base & operator=(const basic_string_base &);
|
||||
basic_string_base(const basic_string_base &);
|
||||
|
||||
typedef allocator_traits<Allocator> allocator_traits_type;
|
||||
public:
|
||||
typedef Allocator allocator_type;
|
||||
typedef Allocator allocator_type;
|
||||
typedef allocator_type stored_allocator_type;
|
||||
typedef typename allocator_traits_type::pointer pointer;
|
||||
typedef typename allocator_traits_type::value_type value_type;
|
||||
@@ -86,6 +87,10 @@ class basic_string_base
|
||||
: members_(a)
|
||||
{ init(); }
|
||||
|
||||
basic_string_base(BOOST_RV_REF(allocator_type) a)
|
||||
: members_(boost::move(a))
|
||||
{ this->init(); }
|
||||
|
||||
basic_string_base(const allocator_type& a, size_type n)
|
||||
: members_(a)
|
||||
{
|
||||
@@ -93,13 +98,6 @@ class basic_string_base
|
||||
this->allocate_initial_block(n);
|
||||
}
|
||||
|
||||
basic_string_base(BOOST_RV_REF(basic_string_base) b)
|
||||
: members_(boost::move(b.alloc()))
|
||||
{
|
||||
this->init();
|
||||
this->swap_data(b);
|
||||
}
|
||||
|
||||
~basic_string_base()
|
||||
{
|
||||
if(!this->is_short()){
|
||||
@@ -606,8 +604,15 @@ class basic_string
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
basic_string(BOOST_RV_REF(basic_string) s) BOOST_CONTAINER_NOEXCEPT
|
||||
: base_t(boost::move((base_t&)s))
|
||||
{}
|
||||
: base_t(boost::move(s.alloc()))
|
||||
{
|
||||
if(s.alloc() == this->alloc()){
|
||||
this->swap_data(s);
|
||||
}
|
||||
else{
|
||||
this->assign(s.begin(), s.end());
|
||||
}
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: Copy constructs a basic_string using the specified allocator.
|
||||
//!
|
||||
|
Reference in New Issue
Block a user