summaryrefslogtreecommitdiff
path: root/asl/containers/buffer.hpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2025-05-17 23:01:51 +0200
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2025-05-17 23:01:51 +0200
commit54b95b16629f0cd4bc30e6899e00019b3ab94012 (patch)
treed1ce8c21bab489318832e9c6f1b8961e255fa208 /asl/containers/buffer.hpp
parente7e70233405a523cfe75536ac5819cbb8cfb5f17 (diff)
Buffer type has to be moveable, always
Diffstat (limited to 'asl/containers/buffer.hpp')
-rw-r--r--asl/containers/buffer.hpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/asl/containers/buffer.hpp b/asl/containers/buffer.hpp
index 0e30745..f554218 100644
--- a/asl/containers/buffer.hpp
+++ b/asl/containers/buffer.hpp
@@ -16,7 +16,8 @@
namespace asl
{
-template<is_object T, allocator Allocator = DefaultAllocator>
+template<typename T, allocator Allocator = DefaultAllocator>
+requires is_object<T> && moveable<T>
class buffer
{
T* m_data{};
@@ -244,7 +245,6 @@ public:
}
constexpr buffer(buffer&& other)
- requires moveable<T>
: buffer(std::move(other.m_allocator))
{
move_from_other(std::move(other), false);
@@ -259,7 +259,6 @@ public:
}
constexpr buffer& operator=(buffer&& other)
- requires moveable<T>
{
if (&other == this) { return *this; }
move_from_other(std::move(other), true);