summaryrefslogtreecommitdiff
path: root/asl/hash.hpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2025-01-08 23:40:52 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2025-01-08 23:40:52 +0100
commit838c4b9a45a50f252c7b20d14570b0b7463709ab (patch)
treef50b70c18236a0d3f0b93994d5b0fb8955dd58d6 /asl/hash.hpp
parentb94a42b978251c4cdb4eb0be2a2e8d9dc8949eba (diff)
Finish work on hashing probably
Diffstat (limited to 'asl/hash.hpp')
-rw-r--r--asl/hash.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/asl/hash.hpp b/asl/hash.hpp
index 5f81e92..d3a12bd 100644
--- a/asl/hash.hpp
+++ b/asl/hash.hpp
@@ -120,6 +120,12 @@ constexpr H AslHashValue(H h, bool value)
template<typename H, typename T>
constexpr void AslHashValue(H h, T*); // Don't hash pointers
+template<typename H, hashable T>
+constexpr H AslHashValue(H h, const span<T>& s)
+{
+ return H::combine_contiguous(ASL_MOVE(h), span<const T>{s.data(), s.size()});
+}
+
template<hashable T>
constexpr uint64_t hash_value(const T& value)
{