diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-12-31 01:16:12 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-12-31 01:16:12 +0100 |
commit | b2eddfabffeb78fc5b49f9c17d70175d2dfed2e0 (patch) | |
tree | 4f292d1608b0c5f4f60dab65af66a7c29156f425 /asl/allocator.hpp | |
parent | 739f53210466415affd5b0ebd5b3da5c251d232c (diff) |
Some work on buffer move
Diffstat (limited to 'asl/allocator.hpp')
-rw-r--r-- | asl/allocator.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/asl/allocator.hpp b/asl/allocator.hpp index eb03e0f..5f8f9b6 100644 --- a/asl/allocator.hpp +++ b/asl/allocator.hpp @@ -7,7 +7,7 @@ namespace asl {
template<typename T>
-concept allocator = moveable<T> &&
+concept allocator = moveable<T> && equality_comparable<T> &&
requires(T& alloc, layout layout, void* ptr)
{
{ alloc.alloc(layout) } -> same_as<void*>;
@@ -21,6 +21,8 @@ public: static void* alloc(const layout&);
static void* realloc(void* ptr, const layout& old, const layout& new_layout);
static void dealloc(void* ptr, const layout&);
+
+ constexpr bool operator==(const GlobalHeap&) const { return true; }
};
static_assert(allocator<GlobalHeap>);
|