summaryrefslogtreecommitdiffstats
path: root/src/common/hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/hash.h')
-rw-r--r--src/common/hash.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/hash.h b/src/common/hash.h
index b6f3e6d6f..e8fe78b07 100644
--- a/src/common/hash.h
+++ b/src/common/hash.h
@@ -18,4 +18,11 @@ struct PairHash {
}
};
+template <typename T>
+struct IdentityHash {
+ [[nodiscard]] size_t operator()(T value) const noexcept {
+ return static_cast<size_t>(value);
+ }
+};
+
} // namespace Common