Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion flat_hash_map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,9 @@ class sherwood_v3_table : private EntryAlloc, private Hasher, private Equal
}
~sherwood_v3_table()
{
clear();
if constexpr (not std::is_trivially_destructible_v<value_type>) {
clear();
}
deallocate_data(entries, num_slots_minus_one, max_lookups);
}

Expand Down Expand Up @@ -555,6 +557,10 @@ class sherwood_v3_table : private EntryAlloc, private Hasher, private Equal
{
return find(key) == end() ? 0 : 1;
}
bool contains(const FindKey & key) const
{
return find(key) != end();
}
std::pair<iterator, iterator> equal_range(const FindKey & key)
{
iterator found = find(key);
Expand Down