summaryrefslogtreecommitdiff
path: root/src/hash.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-03-06 19:47:26 +0000
committerMaxime Coste <mawww@kakoune.org>2017-03-06 22:25:08 +0000
commit420373475e9f8c4a2c3b570ee3c528090fa2ce49 (patch)
tree3d28a2d62387aa26478629ecfdfa3b21f32d4e98 /src/hash.hh
parent6757ddc6cbc0b585549099d1a1850ec836bcebb0 (diff)
Introduce a custom HashMap implementation along with a quick benchmark
Diffstat (limited to 'src/hash.hh')
-rw-r--r--src/hash.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/hash.hh b/src/hash.hh
index 896478f3..ddce1cff 100644
--- a/src/hash.hh
+++ b/src/hash.hh
@@ -58,6 +58,13 @@ struct Hash
}
};
+// Traits specifying if two types have compatible hashing, that is,
+// if lhs == rhs => hash_value(lhs) == hash_value(rhs)
+template<typename Lhs, typename Rhs>
+struct HashCompatible : std::false_type {};
+
+template<typename T> struct HashCompatible<T, T> : std::true_type {};
+
}
#endif // hash_hh_INCLUDED