mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 11:27:15 +02:00
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:
@ -127,16 +127,13 @@ namespace boost {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
unordered_flat_map& operator=(unordered_flat_map&& other)
|
unordered_flat_map& operator=(unordered_flat_map&& other) noexcept(
|
||||||
noexcept(std::allocator_traits<allocator_type>::is_always_equal::value&&
|
noexcept(std::declval<table_type&>() = std::declval<table_type&&>()))
|
||||||
std::is_nothrow_move_assignable<hasher>::value&&
|
|
||||||
std::is_nothrow_move_assignable<key_equal>::value)
|
|
||||||
{
|
{
|
||||||
table_ = std::move(other.table_);
|
table_ = std::move(other.table_);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
allocator_type get_allocator() const noexcept
|
allocator_type get_allocator() const noexcept
|
||||||
{
|
{
|
||||||
return table_.get_allocator();
|
return table_.get_allocator();
|
||||||
|
@ -121,16 +121,13 @@ namespace boost {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
unordered_flat_set& operator=(unordered_flat_set&& other)
|
unordered_flat_set& operator=(unordered_flat_set&& other) noexcept(
|
||||||
noexcept(std::allocator_traits<allocator_type>::is_always_equal::value&&
|
noexcept(std::declval<table_type&>() = std::declval<table_type&&>()))
|
||||||
std::is_nothrow_move_assignable<hasher>::value&&
|
|
||||||
std::is_nothrow_move_assignable<key_equal>::value)
|
|
||||||
{
|
{
|
||||||
table_ = std::move(other.table_);
|
table_ = std::move(other.table_);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
allocator_type get_allocator() const noexcept
|
allocator_type get_allocator() const noexcept
|
||||||
{
|
{
|
||||||
return table_.get_allocator();
|
return table_.get_allocator();
|
||||||
|
Reference in New Issue
Block a user