summaryrefslogtreecommitdiff
path: root/asl/hash.hpp
diff options
context:
space:
mode:
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)
{