operator= noexcept support

This commit is contained in:
Daniel James
2018-01-05 17:54:44 +00:00
parent 5854090dc7
commit f12009fc61
4 changed files with 169 additions and 85 deletions
+12 -16
View File
@@ -151,10 +151,9 @@ namespace boost {
}
unordered_map& operator=(BOOST_RV_REF(unordered_map) x)
// C++17 support: BOOST_NOEXCEPT_IF(
// value_allocator_traits::is_always_equal::value &&
// is_nothrow_move_assignable_v<H> &&
// is_nothrow_move_assignable_v<P>)
BOOST_NOEXCEPT_IF(value_allocator_traits::is_always_equal::value&&
boost::is_nothrow_move_assignable<H>::value&&
boost::is_nothrow_move_assignable<P>::value)
{
table_.move_assign(x.table_, boost::unordered::detail::true_type());
return *this;
@@ -168,10 +167,9 @@ namespace boost {
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
unordered_map& operator=(unordered_map&& x)
// C++17 support: BOOST_NOEXCEPT_IF(
// value_allocator_traits::is_always_equal::value &&
// is_nothrow_move_assignable_v<H> &&
// is_nothrow_move_assignable_v<P>)
BOOST_NOEXCEPT_IF(value_allocator_traits::is_always_equal::value&&
boost::is_nothrow_move_assignable<H>::value&&
boost::is_nothrow_move_assignable<P>::value)
{
table_.move_assign(x.table_, boost::unordered::detail::true_type());
return *this;
@@ -1023,10 +1021,9 @@ namespace boost {
}
unordered_multimap& operator=(BOOST_RV_REF(unordered_multimap) x)
// C++17 support: BOOST_NOEXCEPT_IF(
// value_allocator_traits::is_always_equal::value &&
// is_nothrow_move_assignable_v<H> &&
// is_nothrow_move_assignable_v<P>)
BOOST_NOEXCEPT_IF(value_allocator_traits::is_always_equal::value&&
boost::is_nothrow_move_assignable<H>::value&&
boost::is_nothrow_move_assignable<P>::value)
{
table_.move_assign(x.table_, boost::unordered::detail::false_type());
return *this;
@@ -1040,10 +1037,9 @@ namespace boost {
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
unordered_multimap& operator=(unordered_multimap&& x)
// C++17 support: BOOST_NOEXCEPT_IF(
// value_allocator_traits::is_always_equal::value &&
// is_nothrow_move_assignable_v<H> &&
// is_nothrow_move_assignable_v<P>)
BOOST_NOEXCEPT_IF(value_allocator_traits::is_always_equal::value&&
boost::is_nothrow_move_assignable<H>::value&&
boost::is_nothrow_move_assignable<P>::value)
{
table_.move_assign(x.table_, boost::unordered::detail::false_type());
return *this;