Fix use after move in HashMap::insert
Apparently GCC builds worked fine but Clang builds started failing the "(hash == hash_value(item_key(item)))" assertion.
This commit is contained in:
parent
296ab1a1ff
commit
4499b26ca4
|
@ -214,7 +214,8 @@ struct HashMap
|
|||
|
||||
constexpr EffectiveValue& insert(Item item)
|
||||
{
|
||||
return insert(std::move(item), hash_value(item_key(item)));
|
||||
const auto hash = hash_value(item_key(item));
|
||||
return insert(std::move(item), hash);
|
||||
}
|
||||
|
||||
template<typename KeyType> requires IsHashCompatible<Key, KeyType>
|
||||
|
|
Loading…
Reference in New Issue
Block a user