aboutsummaryrefslogtreecommitdiff
path: root/absl/container/flat_hash_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/container/flat_hash_map.h')
-rw-r--r--absl/container/flat_hash_map.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/absl/container/flat_hash_map.h b/absl/container/flat_hash_map.h
index 808a62ba..2a1ad0fb 100644
--- a/absl/container/flat_hash_map.h
+++ b/absl/container/flat_hash_map.h
@@ -593,6 +593,13 @@ struct FlatHashMapPolicy {
std::forward<Args>(args)...);
}
+ template <class Hash>
+ static constexpr HashSlotFn get_hash_slot_fn() {
+ return memory_internal::IsLayoutCompatible<K, V>::value
+ ? &TypeErasedApplyToSlotFn<Hash, K>
+ : nullptr;
+ }
+
static size_t space_used(const slot_type*) { return 0; }
static std::pair<const K, V>& element(slot_type* slot) { return slot->value; }