Add impl of member function swap()

This commit is contained in:
Christian Mazakas
2023-05-02 13:44:27 -07:00
parent 40c4d456f3
commit 2ea0dbf30e
4 changed files with 273 additions and 2 deletions
@@ -694,6 +694,13 @@ namespace boost {
return table_.erase_if(f);
}
void swap(concurrent_flat_map& other) noexcept(
boost::allocator_is_always_equal<Allocator>::type::value ||
boost::allocator_propagate_on_container_swap<Allocator>::type::value)
{
return table_.swap(other.table_);
}
void clear() noexcept { table_.clear(); }
/// Hash Policy
+2 -2
View File
@@ -1447,8 +1447,8 @@ public:
swap(h(),x.h());
swap(pred(),x.pred());
swap(arrays,x.arrays);
swap(ml,x.ml);
swap(size_,x.size_);
swap_size_impl(ml,x.ml);
swap_size_impl(size_,x.size_);
}
void clear()noexcept