updated move assignments and swap operations to "N4258: Cleaning-up noexcept in the Library, Rev 3" with some customizations.

This commit is contained in:
Ion Gaztañaga
2015-01-19 00:18:44 +01:00
parent 18ad354dcf
commit dbafd61d4d
13 changed files with 94 additions and 34 deletions
+10 -3
View File
@@ -224,7 +224,8 @@ class set
//! propagate_on_container_move_assignment is true or
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
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))); }
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
@@ -522,7 +523,9 @@ class set
//! <b>Throws</b>: Nothing.
//!
//! <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()).
//!
@@ -835,6 +838,8 @@ class multiset
//! @copydoc ::boost::container::set::operator=(set &&)
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))); }
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
@@ -1013,7 +1018,9 @@ class multiset
iterator erase(const_iterator first, const_iterator last);
//! @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
void clear() BOOST_CONTAINER_NOEXCEPT;