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/buffer.hpp | |
parent | e18b054779766269a4b9ca68729c380d24c0535d (diff) |
More work on hashing
Diffstat (limited to 'asl/buffer.hpp')
-rw-r--r-- | asl/buffer.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/asl/buffer.hpp b/asl/buffer.hpp index 90bfc96..7d33c73 100644 --- a/asl/buffer.hpp +++ b/asl/buffer.hpp @@ -389,6 +389,12 @@ public: ASL_ASSERT(i >= 0 && i <= size());
return data()[i];
}
+
+ template<typename H>
+ friend H AslHashValue(H h, const buffer& b)
+ {
+ return H::combine_contiguous(ASL_MOVE(h), b.as_span());
+ }
};
} // namespace asl
|