forked from boostorg/container
updated move assignments and swap operations to "N4258: Cleaning-up noexcept in the Library, Rev 3" with some customizations.
This commit is contained in:
@@ -330,7 +330,8 @@ class flat_map
|
||||
//! propagate_on_container_move_assignment is true or
|
||||
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
||||
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; }
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
@@ -877,6 +878,8 @@ class flat_map
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
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); }
|
||||
|
||||
//! <b>Effects</b>: erase(a.begin(),a.end()).
|
||||
@@ -1314,7 +1317,8 @@ class flat_multimap
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
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; }
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
@@ -1780,6 +1784,8 @@ class flat_multimap
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
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); }
|
||||
|
||||
//! <b>Effects</b>: erase(a.begin(),a.end()).
|
||||
|
||||
Reference in New Issue
Block a user