diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-11-19 23:30:55 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-12-20 15:35:58 +0100 |
commit | f5ef1937eafb3d96b3683d92639a193694210c70 (patch) | |
tree | 0edcffc7447c42fe8467e2b788ee8f65f96b7fe2 /asl/allocator.hpp | |
parent | 3bddc19f5854857788330f11993336f645c414ab (diff) |
More work on asl::box
Diffstat (limited to 'asl/allocator.hpp')
-rw-r--r-- | asl/allocator.hpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/asl/allocator.hpp b/asl/allocator.hpp index b6c1a9a..eb03e0f 100644 --- a/asl/allocator.hpp +++ b/asl/allocator.hpp @@ -7,12 +7,13 @@ namespace asl {
template<typename T>
-concept allocator = requires(T& alloc, layout layout, void* ptr)
-{
- { alloc.alloc(layout) } -> same_as<void*>;
- { alloc.realloc(ptr, layout, layout) } -> same_as<void*>;
- alloc.dealloc(ptr, layout);
-};
+concept allocator = moveable<T> &&
+ requires(T& alloc, layout layout, void* ptr)
+ {
+ { alloc.alloc(layout) } -> same_as<void*>;
+ { alloc.realloc(ptr, layout, layout) } -> same_as<void*>;
+ alloc.dealloc(ptr, layout);
+ };
class GlobalHeap
{
|