diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-01-07 23:17:50 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-01-07 23:17:50 +0100 |
commit | b94a42b978251c4cdb4eb0be2a2e8d9dc8949eba (patch) | |
tree | 81ac62603714fbee3db7cc2c616d170cd6b5fe2c /asl/span.hpp | |
parent | e18b054779766269a4b9ca68729c380d24c0535d (diff) |
More work on hashing
Diffstat (limited to 'asl/span.hpp')
-rw-r--r-- | asl/span.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/asl/span.hpp b/asl/span.hpp index 8f6fb4a..bb36291 100644 --- a/asl/span.hpp +++ b/asl/span.hpp @@ -171,6 +171,12 @@ public: ASL_ASSERT(sub_size >= 0 && sub_size <= size()); return span<T>{ data() + size() - sub_size, sub_size }; } + + template<typename H> + friend H AslHashValue(H h, const span& s) + { + return H::combine_contiguous(ASL_MOVE(h), span<const T>{s.data(), s.size()}); + } }; template<is_object T, isize_t kSize> |