mirror of
https://github.com/boostorg/unordered.git
synced 2025-11-08 11:41:44 +01:00
Swap noexcept support
Not properly supported as we don't have is_nothrow_swappable yet.
This commit is contained in:
@@ -441,11 +441,10 @@ namespace boost {
|
||||
BOOST_UNORDERED_DEPRECATED("Use erase instead")
|
||||
void erase_return_void(const_iterator it) { erase(it); }
|
||||
|
||||
void swap(unordered_set&);
|
||||
// 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>)
|
||||
void swap(unordered_set&)
|
||||
BOOST_NOEXCEPT_IF(value_allocator_traits::is_always_equal::value&&
|
||||
boost::unordered::detail::is_nothrow_swappable<H>::value&&
|
||||
boost::unordered::detail::is_nothrow_swappable<P>::value);
|
||||
void clear() BOOST_NOEXCEPT { table_.clear_impl(); }
|
||||
|
||||
template <typename H2, typename P2>
|
||||
@@ -991,11 +990,10 @@ namespace boost {
|
||||
BOOST_UNORDERED_DEPRECATED("Use erase instead")
|
||||
void erase_return_void(const_iterator it) { erase(it); }
|
||||
|
||||
void swap(unordered_multiset&);
|
||||
// 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>)
|
||||
void swap(unordered_multiset&)
|
||||
BOOST_NOEXCEPT_IF(value_allocator_traits::is_always_equal::value&&
|
||||
boost::unordered::detail::is_nothrow_swappable<H>::value&&
|
||||
boost::unordered::detail::is_nothrow_swappable<P>::value);
|
||||
void clear() BOOST_NOEXCEPT { table_.clear_impl(); }
|
||||
|
||||
template <typename H2, typename P2>
|
||||
@@ -1365,10 +1363,9 @@ namespace boost {
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
void unordered_set<T, H, P, A>::swap(unordered_set& other)
|
||||
// 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::unordered::detail::is_nothrow_swappable<H>::value&&
|
||||
boost::unordered::detail::is_nothrow_swappable<P>::value)
|
||||
{
|
||||
table_.swap(other.table_);
|
||||
}
|
||||
@@ -1760,10 +1757,9 @@ namespace boost {
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
void unordered_multiset<T, H, P, A>::swap(unordered_multiset& other)
|
||||
// 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::unordered::detail::is_nothrow_swappable<H>::value&&
|
||||
boost::unordered::detail::is_nothrow_swappable<P>::value)
|
||||
{
|
||||
table_.swap(other.table_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user