mirror of
https://github.com/boostorg/container.git
synced 2025-08-02 22:14:26 +02:00
updated move assignments and swap operations to "N4258: Cleaning-up noexcept in the Library, Rev 3" with some customizations.
This commit is contained in:
@@ -733,7 +733,8 @@ class deque : protected deque_base<Allocator>
|
|||||||
//! propagate_on_container_move_assignment is true or
|
//! propagate_on_container_move_assignment is true or
|
||||||
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
||||||
deque& operator= (BOOST_RV_REF(deque) x)
|
deque& operator= (BOOST_RV_REF(deque) x)
|
||||||
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value)
|
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
|
||||||
|
|| allocator_traits_type::is_always_equal::value)
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(this != &x);
|
BOOST_ASSERT(this != &x);
|
||||||
allocator_type &this_alloc = this->alloc();
|
allocator_type &this_alloc = this->alloc();
|
||||||
@@ -1622,6 +1623,8 @@ class deque : protected deque_base<Allocator>
|
|||||||
//!
|
//!
|
||||||
//! <b>Complexity</b>: Constant.
|
//! <b>Complexity</b>: Constant.
|
||||||
void swap(deque &x)
|
void swap(deque &x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_swap::value
|
||||||
|
|| allocator_traits_type::is_always_equal::value)
|
||||||
{
|
{
|
||||||
this->swap_members(x);
|
this->swap_members(x);
|
||||||
container_detail::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
|
container_detail::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
|
||||||
|
@@ -98,8 +98,9 @@ template <class Key, class Value, class KeyOfValue,
|
|||||||
class Compare, class Allocator>
|
class Compare, class Allocator>
|
||||||
class flat_tree
|
class flat_tree
|
||||||
{
|
{
|
||||||
typedef boost::container::vector<Value, Allocator> vector_t;
|
typedef boost::container::vector<Value, Allocator> vector_t;
|
||||||
typedef Allocator allocator_t;
|
typedef Allocator allocator_t;
|
||||||
|
typedef allocator_traits<Allocator> allocator_traits_type;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef flat_tree_value_compare<Compare, Value, KeyOfValue> value_compare;
|
typedef flat_tree_value_compare<Compare, Value, KeyOfValue> value_compare;
|
||||||
@@ -264,6 +265,8 @@ class flat_tree
|
|||||||
{ m_data = x.m_data; return *this; }
|
{ m_data = x.m_data; return *this; }
|
||||||
|
|
||||||
flat_tree& operator=(BOOST_RV_REF(flat_tree) x)
|
flat_tree& operator=(BOOST_RV_REF(flat_tree) x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
|
||||||
{ m_data = boost::move(x.m_data); return *this; }
|
{ m_data = boost::move(x.m_data); return *this; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -329,6 +332,8 @@ class flat_tree
|
|||||||
{ return this->m_data.m_vect.max_size(); }
|
{ return this->m_data.m_vect.max_size(); }
|
||||||
|
|
||||||
void swap(flat_tree& other)
|
void swap(flat_tree& other)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value )
|
||||||
{ this->m_data.swap(other.m_data); }
|
{ this->m_data.swap(other.m_data); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@@ -471,16 +471,18 @@ class tree
|
|||||||
>
|
>
|
||||||
{
|
{
|
||||||
typedef tree_value_compare
|
typedef tree_value_compare
|
||||||
<Key, T, Compare, KeyOfValue> ValComp;
|
<Key, T, Compare, KeyOfValue> ValComp;
|
||||||
typedef typename container_detail::intrusive_tree_type
|
typedef typename container_detail::intrusive_tree_type
|
||||||
< Allocator, ValComp, Options::tree_type
|
< Allocator, ValComp, Options::tree_type
|
||||||
, Options::optimize_size>::type Icont;
|
, Options::optimize_size>::type Icont;
|
||||||
typedef container_detail::node_alloc_holder
|
typedef container_detail::node_alloc_holder
|
||||||
<Allocator, Icont> AllocHolder;
|
<Allocator, Icont> AllocHolder;
|
||||||
typedef typename AllocHolder::NodePtr NodePtr;
|
typedef typename AllocHolder::NodePtr NodePtr;
|
||||||
typedef tree < Key, T, KeyOfValue
|
typedef tree < Key, T, KeyOfValue
|
||||||
, Compare, Allocator, Options> ThisType;
|
, Compare, Allocator, Options> ThisType;
|
||||||
typedef typename AllocHolder::NodeAlloc NodeAlloc;
|
typedef typename AllocHolder::NodeAlloc NodeAlloc;
|
||||||
|
typedef boost::container::
|
||||||
|
allocator_traits<NodeAlloc> allocator_traits_type;
|
||||||
typedef typename AllocHolder::ValAlloc ValAlloc;
|
typedef typename AllocHolder::ValAlloc ValAlloc;
|
||||||
typedef typename AllocHolder::Node Node;
|
typedef typename AllocHolder::Node Node;
|
||||||
typedef typename Icont::iterator iiterator;
|
typedef typename Icont::iterator iiterator;
|
||||||
@@ -494,22 +496,22 @@ class tree
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
typedef Key key_type;
|
typedef Key key_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
typedef Allocator allocator_type;
|
typedef Allocator allocator_type;
|
||||||
typedef Compare key_compare;
|
typedef Compare key_compare;
|
||||||
typedef ValComp value_compare;
|
typedef ValComp value_compare;
|
||||||
typedef typename boost::container::
|
typedef typename boost::container::
|
||||||
allocator_traits<Allocator>::pointer pointer;
|
allocator_traits<Allocator>::pointer pointer;
|
||||||
typedef typename boost::container::
|
typedef typename boost::container::
|
||||||
allocator_traits<Allocator>::const_pointer const_pointer;
|
allocator_traits<Allocator>::const_pointer const_pointer;
|
||||||
typedef typename boost::container::
|
typedef typename boost::container::
|
||||||
allocator_traits<Allocator>::reference reference;
|
allocator_traits<Allocator>::reference reference;
|
||||||
typedef typename boost::container::
|
typedef typename boost::container::
|
||||||
allocator_traits<Allocator>::const_reference const_reference;
|
allocator_traits<Allocator>::const_reference const_reference;
|
||||||
typedef typename boost::container::
|
typedef typename boost::container::
|
||||||
allocator_traits<Allocator>::size_type size_type;
|
allocator_traits<Allocator>::size_type size_type;
|
||||||
typedef typename boost::container::
|
typedef typename boost::container::
|
||||||
allocator_traits<Allocator>::difference_type difference_type;
|
allocator_traits<Allocator>::difference_type difference_type;
|
||||||
typedef difference_type tree_difference_type;
|
typedef difference_type tree_difference_type;
|
||||||
typedef pointer tree_pointer;
|
typedef pointer tree_pointer;
|
||||||
typedef const_pointer tree_const_pointer;
|
typedef const_pointer tree_const_pointer;
|
||||||
@@ -696,6 +698,8 @@ class tree
|
|||||||
}
|
}
|
||||||
|
|
||||||
tree& operator=(BOOST_RV_REF(tree) x)
|
tree& operator=(BOOST_RV_REF(tree) x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(this != &x);
|
BOOST_ASSERT(this != &x);
|
||||||
NodeAlloc &this_alloc = this->node_alloc();
|
NodeAlloc &this_alloc = this->node_alloc();
|
||||||
@@ -820,6 +824,8 @@ class tree
|
|||||||
{ return AllocHolder::max_size(); }
|
{ return AllocHolder::max_size(); }
|
||||||
|
|
||||||
void swap(ThisType& x)
|
void swap(ThisType& x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value )
|
||||||
{ AllocHolder::swap(x); }
|
{ AllocHolder::swap(x); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@@ -50,6 +50,7 @@ using ::boost::move_detail::is_nothrow_copy_constructible;
|
|||||||
using ::boost::move_detail::is_nothrow_move_constructible;
|
using ::boost::move_detail::is_nothrow_move_constructible;
|
||||||
using ::boost::move_detail::is_nothrow_copy_assignable;
|
using ::boost::move_detail::is_nothrow_copy_assignable;
|
||||||
using ::boost::move_detail::is_nothrow_move_assignable;
|
using ::boost::move_detail::is_nothrow_move_assignable;
|
||||||
|
using ::boost::move_detail::is_nothrow_swappable;
|
||||||
using ::boost::move_detail::alignment_of;
|
using ::boost::move_detail::alignment_of;
|
||||||
using ::boost::move_detail::aligned_storage;
|
using ::boost::move_detail::aligned_storage;
|
||||||
using ::boost::move_detail::nat;
|
using ::boost::move_detail::nat;
|
||||||
|
@@ -330,7 +330,8 @@ class flat_map
|
|||||||
//! propagate_on_container_move_assignment is true or
|
//! propagate_on_container_move_assignment is true or
|
||||||
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
||||||
flat_map& operator=(BOOST_RV_REF(flat_map) x)
|
flat_map& operator=(BOOST_RV_REF(flat_map) x)
|
||||||
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value)
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
|
||||||
{ m_flat_tree = boost::move(x.m_flat_tree); return *this; }
|
{ m_flat_tree = boost::move(x.m_flat_tree); return *this; }
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||||
@@ -877,6 +878,8 @@ class flat_map
|
|||||||
//!
|
//!
|
||||||
//! <b>Complexity</b>: Constant.
|
//! <b>Complexity</b>: Constant.
|
||||||
void swap(flat_map& x)
|
void swap(flat_map& x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value )
|
||||||
{ m_flat_tree.swap(x.m_flat_tree); }
|
{ m_flat_tree.swap(x.m_flat_tree); }
|
||||||
|
|
||||||
//! <b>Effects</b>: erase(a.begin(),a.end()).
|
//! <b>Effects</b>: erase(a.begin(),a.end()).
|
||||||
@@ -1314,7 +1317,8 @@ class flat_multimap
|
|||||||
//!
|
//!
|
||||||
//! <b>Complexity</b>: Constant.
|
//! <b>Complexity</b>: Constant.
|
||||||
flat_multimap& operator=(BOOST_RV_REF(flat_multimap) x)
|
flat_multimap& operator=(BOOST_RV_REF(flat_multimap) x)
|
||||||
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value)
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
|
||||||
{ m_flat_tree = boost::move(x.m_flat_tree); return *this; }
|
{ m_flat_tree = boost::move(x.m_flat_tree); return *this; }
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||||
@@ -1780,6 +1784,8 @@ class flat_multimap
|
|||||||
//!
|
//!
|
||||||
//! <b>Complexity</b>: Constant.
|
//! <b>Complexity</b>: Constant.
|
||||||
void swap(flat_multimap& x)
|
void swap(flat_multimap& x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value )
|
||||||
{ m_flat_tree.swap(x.m_flat_tree); }
|
{ m_flat_tree.swap(x.m_flat_tree); }
|
||||||
|
|
||||||
//! <b>Effects</b>: erase(a.begin(),a.end()).
|
//! <b>Effects</b>: erase(a.begin(),a.end()).
|
||||||
|
@@ -232,7 +232,8 @@ class flat_set
|
|||||||
//! propagate_on_container_move_assignment is true or
|
//! propagate_on_container_move_assignment is true or
|
||||||
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
||||||
flat_set& operator=(BOOST_RV_REF(flat_set) x)
|
flat_set& operator=(BOOST_RV_REF(flat_set) x)
|
||||||
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value)
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
|
||||||
{ return static_cast<flat_set&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
{ return static_cast<flat_set&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||||
@@ -619,7 +620,9 @@ class flat_set
|
|||||||
//! <b>Throws</b>: Nothing.
|
//! <b>Throws</b>: Nothing.
|
||||||
//!
|
//!
|
||||||
//! <b>Complexity</b>: Constant.
|
//! <b>Complexity</b>: Constant.
|
||||||
void swap(flat_set& x);
|
void swap(flat_set& x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value );
|
||||||
|
|
||||||
//! <b>Effects</b>: erase(a.begin(),a.end()).
|
//! <b>Effects</b>: erase(a.begin(),a.end()).
|
||||||
//!
|
//!
|
||||||
@@ -956,7 +959,8 @@ class flat_multiset
|
|||||||
|
|
||||||
//! @copydoc ::boost::container::flat_set::operator=(flat_set &&)
|
//! @copydoc ::boost::container::flat_set::operator=(flat_set &&)
|
||||||
flat_multiset& operator=(BOOST_RV_REF(flat_multiset) x)
|
flat_multiset& operator=(BOOST_RV_REF(flat_multiset) x)
|
||||||
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value)
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
|
||||||
{ return static_cast<flat_multiset&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
{ return static_cast<flat_multiset&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||||
@@ -1198,7 +1202,9 @@ class flat_multiset
|
|||||||
iterator erase(const_iterator first, const_iterator last);
|
iterator erase(const_iterator first, const_iterator last);
|
||||||
|
|
||||||
//! @copydoc ::boost::container::flat_set::swap
|
//! @copydoc ::boost::container::flat_set::swap
|
||||||
void swap(flat_multiset& x);
|
void swap(flat_multiset& x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value );
|
||||||
|
|
||||||
//! @copydoc ::boost::container::flat_set::clear
|
//! @copydoc ::boost::container::flat_set::clear
|
||||||
void clear() BOOST_CONTAINER_NOEXCEPT;
|
void clear() BOOST_CONTAINER_NOEXCEPT;
|
||||||
|
@@ -339,7 +339,8 @@ class list
|
|||||||
//! propagate_on_container_move_assignment is true or
|
//! propagate_on_container_move_assignment is true or
|
||||||
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
||||||
list& operator=(BOOST_RV_REF(list) x)
|
list& operator=(BOOST_RV_REF(list) x)
|
||||||
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value)
|
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
|
||||||
|
|| allocator_traits_type::is_always_equal::value)
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(this != &x);
|
BOOST_ASSERT(this != &x);
|
||||||
NodeAlloc &this_alloc = this->node_alloc();
|
NodeAlloc &this_alloc = this->node_alloc();
|
||||||
@@ -931,6 +932,8 @@ class list
|
|||||||
//!
|
//!
|
||||||
//! <b>Complexity</b>: Constant.
|
//! <b>Complexity</b>: Constant.
|
||||||
void swap(list& x)
|
void swap(list& x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_swap::value
|
||||||
|
|| allocator_traits_type::is_always_equal::value)
|
||||||
{ AllocHolder::swap(x); }
|
{ AllocHolder::swap(x); }
|
||||||
|
|
||||||
//! <b>Effects</b>: Erases all the elements of the list.
|
//! <b>Effects</b>: Erases all the elements of the list.
|
||||||
|
@@ -99,7 +99,7 @@ class map
|
|||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
|
|
||||||
typedef Key key_type;
|
typedef Key key_type;
|
||||||
typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
|
typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
|
||||||
typedef T mapped_type;
|
typedef T mapped_type;
|
||||||
typedef std::pair<const Key, T> value_type;
|
typedef std::pair<const Key, T> value_type;
|
||||||
typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
|
typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
|
||||||
@@ -272,7 +272,9 @@ class map
|
|||||||
//! propagate_on_container_move_assignment is true or
|
//! propagate_on_container_move_assignment is true or
|
||||||
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
||||||
map& operator=(BOOST_RV_REF(map) x)
|
map& operator=(BOOST_RV_REF(map) x)
|
||||||
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value)
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
|
||||||
|
|
||||||
{ return static_cast<map&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
{ return static_cast<map&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||||
@@ -680,7 +682,9 @@ class map
|
|||||||
//! <b>Throws</b>: Nothing.
|
//! <b>Throws</b>: Nothing.
|
||||||
//!
|
//!
|
||||||
//! <b>Complexity</b>: Constant.
|
//! <b>Complexity</b>: Constant.
|
||||||
void swap(map& x);
|
void swap(map& x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value )
|
||||||
|
|
||||||
//! <b>Effects</b>: erase(a.begin(),a.end()).
|
//! <b>Effects</b>: erase(a.begin(),a.end()).
|
||||||
//!
|
//!
|
||||||
@@ -894,6 +898,8 @@ class multimap
|
|||||||
> value_compare_impl;
|
> value_compare_impl;
|
||||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||||
|
|
||||||
|
typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
@@ -1065,6 +1071,8 @@ class multimap
|
|||||||
//!
|
//!
|
||||||
//! <b>Complexity</b>: Constant.
|
//! <b>Complexity</b>: Constant.
|
||||||
multimap& operator=(BOOST_RV_REF(multimap) x)
|
multimap& operator=(BOOST_RV_REF(multimap) x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
|
||||||
{ return static_cast<multimap&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
{ return static_cast<multimap&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||||
@@ -1281,7 +1289,9 @@ class multimap
|
|||||||
iterator erase(const_iterator first, const_iterator last);
|
iterator erase(const_iterator first, const_iterator last);
|
||||||
|
|
||||||
//! @copydoc ::boost::container::set::swap
|
//! @copydoc ::boost::container::set::swap
|
||||||
void swap(flat_multiset& x);
|
void swap(multiset& x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value );
|
||||||
|
|
||||||
//! @copydoc ::boost::container::set::clear
|
//! @copydoc ::boost::container::set::clear
|
||||||
void clear() BOOST_CONTAINER_NOEXCEPT;
|
void clear() BOOST_CONTAINER_NOEXCEPT;
|
||||||
|
@@ -224,7 +224,8 @@ class set
|
|||||||
//! propagate_on_container_move_assignment is true or
|
//! propagate_on_container_move_assignment is true or
|
||||||
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
||||||
set& operator=(BOOST_RV_REF(set) x)
|
set& operator=(BOOST_RV_REF(set) x)
|
||||||
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value)
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
|
||||||
{ return static_cast<set&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
{ return static_cast<set&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||||
@@ -522,7 +523,9 @@ class set
|
|||||||
//! <b>Throws</b>: Nothing.
|
//! <b>Throws</b>: Nothing.
|
||||||
//!
|
//!
|
||||||
//! <b>Complexity</b>: Constant.
|
//! <b>Complexity</b>: Constant.
|
||||||
void swap(set& x);
|
void swap(set& x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value );
|
||||||
|
|
||||||
//! <b>Effects</b>: erase(a.begin(),a.end()).
|
//! <b>Effects</b>: erase(a.begin(),a.end()).
|
||||||
//!
|
//!
|
||||||
@@ -835,6 +838,8 @@ class multiset
|
|||||||
|
|
||||||
//! @copydoc ::boost::container::set::operator=(set &&)
|
//! @copydoc ::boost::container::set::operator=(set &&)
|
||||||
multiset& operator=(BOOST_RV_REF(multiset) x)
|
multiset& operator=(BOOST_RV_REF(multiset) x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
|
||||||
{ return static_cast<multiset&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
{ return static_cast<multiset&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||||
@@ -1013,7 +1018,9 @@ class multiset
|
|||||||
iterator erase(const_iterator first, const_iterator last);
|
iterator erase(const_iterator first, const_iterator last);
|
||||||
|
|
||||||
//! @copydoc ::boost::container::set::swap
|
//! @copydoc ::boost::container::set::swap
|
||||||
void swap(flat_multiset& x);
|
void swap(multiset& x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||||
|
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value );
|
||||||
|
|
||||||
//! @copydoc ::boost::container::set::clear
|
//! @copydoc ::boost::container::set::clear
|
||||||
void clear() BOOST_CONTAINER_NOEXCEPT;
|
void clear() BOOST_CONTAINER_NOEXCEPT;
|
||||||
|
@@ -358,7 +358,8 @@ class slist
|
|||||||
//! propagate_on_container_move_assignment is true or
|
//! propagate_on_container_move_assignment is true or
|
||||||
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
||||||
slist& operator= (BOOST_RV_REF(slist) x)
|
slist& operator= (BOOST_RV_REF(slist) x)
|
||||||
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value)
|
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
|
||||||
|
|| allocator_traits_type::is_always_equal::value)
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(this != &x);
|
BOOST_ASSERT(this != &x);
|
||||||
NodeAlloc &this_alloc = this->node_alloc();
|
NodeAlloc &this_alloc = this->node_alloc();
|
||||||
@@ -916,6 +917,8 @@ class slist
|
|||||||
//!
|
//!
|
||||||
//! <b>Complexity</b>: Linear to the number of elements on *this and x.
|
//! <b>Complexity</b>: Linear to the number of elements on *this and x.
|
||||||
void swap(slist& x)
|
void swap(slist& x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::propagate_on_container_swap::value
|
||||||
|
|| allocator_traits_type::is_always_equal::value)
|
||||||
{ AllocHolder::swap(x); }
|
{ AllocHolder::swap(x); }
|
||||||
|
|
||||||
//! <b>Effects</b>: Erases all the elements of the list.
|
//! <b>Effects</b>: Erases all the elements of the list.
|
||||||
|
@@ -751,7 +751,8 @@ class stable_vector
|
|||||||
//! propagate_on_container_move_assignment is true or
|
//! propagate_on_container_move_assignment is true or
|
||||||
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
||||||
stable_vector& operator=(BOOST_RV_REF(stable_vector) x)
|
stable_vector& operator=(BOOST_RV_REF(stable_vector) x)
|
||||||
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value)
|
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
|
||||||
|
|| allocator_traits_type::is_always_equal::value)
|
||||||
{
|
{
|
||||||
//for move constructor, no aliasing (&x != this) is assummed.
|
//for move constructor, no aliasing (&x != this) is assummed.
|
||||||
BOOST_ASSERT(this != &x);
|
BOOST_ASSERT(this != &x);
|
||||||
@@ -1598,6 +1599,8 @@ class stable_vector
|
|||||||
//!
|
//!
|
||||||
//! <b>Complexity</b>: Constant.
|
//! <b>Complexity</b>: Constant.
|
||||||
void swap(stable_vector & x)
|
void swap(stable_vector & x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( allocator_traits_type::propagate_on_container_swap::value
|
||||||
|
|| allocator_traits_type::is_always_equal::value)
|
||||||
{
|
{
|
||||||
STABLE_VECTOR_CHECK_INVARIANT;
|
STABLE_VECTOR_CHECK_INVARIANT;
|
||||||
container_detail::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
|
container_detail::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
|
||||||
|
@@ -751,7 +751,8 @@ class basic_string
|
|||||||
//! propagate_on_container_move_assignment is true or
|
//! propagate_on_container_move_assignment is true or
|
||||||
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
||||||
basic_string& operator=(BOOST_RV_REF(basic_string) x)
|
basic_string& operator=(BOOST_RV_REF(basic_string) x)
|
||||||
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value)
|
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
|
||||||
|
|| allocator_traits_type::is_always_equal::value)
|
||||||
{
|
{
|
||||||
//for move constructor, no aliasing (&x != this) is assummed.
|
//for move constructor, no aliasing (&x != this) is assummed.
|
||||||
BOOST_ASSERT(this != &x);
|
BOOST_ASSERT(this != &x);
|
||||||
@@ -1892,6 +1893,8 @@ class basic_string
|
|||||||
//!
|
//!
|
||||||
//! <b>Throws</b>: Nothing
|
//! <b>Throws</b>: Nothing
|
||||||
void swap(basic_string& x)
|
void swap(basic_string& x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_swap::value
|
||||||
|
|| allocator_traits_type::is_always_equal::value)
|
||||||
{
|
{
|
||||||
this->base_t::swap_data(x);
|
this->base_t::swap_data(x);
|
||||||
container_detail::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
|
container_detail::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
|
||||||
|
@@ -896,7 +896,8 @@ class vector
|
|||||||
//! propagate_on_container_move_assignment is true or
|
//! propagate_on_container_move_assignment is true or
|
||||||
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
||||||
vector& operator=(BOOST_RV_REF(vector) x)
|
vector& operator=(BOOST_RV_REF(vector) x)
|
||||||
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value)
|
BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
|
||||||
|
|| allocator_traits_type::is_always_equal::value)
|
||||||
{
|
{
|
||||||
this->priv_move_assign(boost::move(x));
|
this->priv_move_assign(boost::move(x));
|
||||||
return *this;
|
return *this;
|
||||||
@@ -1784,7 +1785,10 @@ class vector
|
|||||||
//! <b>Throws</b>: Nothing.
|
//! <b>Throws</b>: Nothing.
|
||||||
//!
|
//!
|
||||||
//! <b>Complexity</b>: Constant.
|
//! <b>Complexity</b>: Constant.
|
||||||
void swap(vector& x) BOOST_CONTAINER_NOEXCEPT_IF((!container_detail::is_version<Allocator, 0>::value))
|
void swap(vector& x)
|
||||||
|
BOOST_CONTAINER_NOEXCEPT_IF( ((allocator_traits_type::propagate_on_container_swap::value
|
||||||
|
|| allocator_traits_type::is_always_equal::value) &&
|
||||||
|
!container_detail::is_version<Allocator, 0>::value))
|
||||||
{
|
{
|
||||||
//Just swap internals in case of !version_0. Otherwise, deep swap
|
//Just swap internals in case of !version_0. Otherwise, deep swap
|
||||||
this->m_holder.swap(x.m_holder);
|
this->m_holder.swap(x.m_holder);
|
||||||
|
Reference in New Issue
Block a user