aboutsummaryrefslogtreecommitdiff
path: root/absl/container/node_hash_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/container/node_hash_map.h')
-rw-r--r--absl/container/node_hash_map.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/absl/container/node_hash_map.h b/absl/container/node_hash_map.h
index a396de2e..72e78958 100644
--- a/absl/container/node_hash_map.h
+++ b/absl/container/node_hash_map.h
@@ -36,6 +36,7 @@
#ifndef ABSL_CONTAINER_NODE_HASH_MAP_H_
#define ABSL_CONTAINER_NODE_HASH_MAP_H_
+#include <cstddef>
#include <tuple>
#include <type_traits>
#include <utility>
@@ -590,6 +591,13 @@ class NodeHashMapPolicy
static Value& value(value_type* elem) { return elem->second; }
static const Value& value(const value_type* elem) { return elem->second; }
+
+ template <class Hash>
+ static constexpr HashSlotFn get_hash_slot_fn() {
+ return memory_internal::IsLayoutCompatible<Key, Value>::value
+ ? &TypeErasedDerefAndApplyToSlotFn<Hash, Key>
+ : nullptr;
+ }
};
} // namespace container_internal