diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-01-08 23:40:52 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-01-08 23:40:52 +0100 |
commit | 838c4b9a45a50f252c7b20d14570b0b7463709ab (patch) | |
tree | f50b70c18236a0d3f0b93994d5b0fb8955dd58d6 /asl/box.hpp | |
parent | b94a42b978251c4cdb4eb0be2a2e8d9dc8949eba (diff) |
Finish work on hashing probably
Diffstat (limited to 'asl/box.hpp')
-rw-r--r-- | asl/box.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/asl/box.hpp b/asl/box.hpp index d018c03..340a37c 100644 --- a/asl/box.hpp +++ b/asl/box.hpp @@ -5,6 +5,7 @@ #include "asl/annotations.hpp"
#include "asl/memory.hpp"
#include "asl/utility.hpp"
+#include "asl/hash.hpp"
namespace asl
{
@@ -82,6 +83,13 @@ public: {
return m_ptr == nullptr;
}
+
+ template<typename H>
+ requires hashable<T>
+ friend H AslHashValue(H h, const box& b)
+ {
+ return H::combine(ASL_MOVE(h), *b);
+ }
};
template<is_object T, allocator Allocator = DefaultAllocator, typename... Args>
|