Updated unordered flat container to use declval instead of allocator_traits as old versions of clang don't have is_always_equal

This commit is contained in:
Christian Mazakas
2022-10-05 13:29:48 -07:00
parent 2134116cbc
commit 7501eefd87
2 changed files with 4 additions and 10 deletions

View File

@ -127,16 +127,13 @@ namespace boost {
return *this;
}
unordered_flat_map& operator=(unordered_flat_map&& other)
noexcept(std::allocator_traits<allocator_type>::is_always_equal::value&&
std::is_nothrow_move_assignable<hasher>::value&&
std::is_nothrow_move_assignable<key_equal>::value)
unordered_flat_map& operator=(unordered_flat_map&& other) noexcept(
noexcept(std::declval<table_type&>() = std::declval<table_type&&>()))
{
table_ = std::move(other.table_);
return *this;
}
allocator_type get_allocator() const noexcept
{
return table_.get_allocator();

View File

@ -121,16 +121,13 @@ namespace boost {
return *this;
}
unordered_flat_set& operator=(unordered_flat_set&& other)
noexcept(std::allocator_traits<allocator_type>::is_always_equal::value&&
std::is_nothrow_move_assignable<hasher>::value&&
std::is_nothrow_move_assignable<key_equal>::value)
unordered_flat_set& operator=(unordered_flat_set&& other) noexcept(
noexcept(std::declval<table_type&>() = std::declval<table_type&&>()))
{
table_ = std::move(other.table_);
return *this;
}
allocator_type get_allocator() const noexcept
{
return table_.get_allocator();