summaryrefslogtreecommitdiff
path: root/asl/buffer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'asl/buffer.hpp')
-rw-r--r--asl/buffer.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/asl/buffer.hpp b/asl/buffer.hpp
index 276222d..a616011 100644
--- a/asl/buffer.hpp
+++ b/asl/buffer.hpp
@@ -114,6 +114,8 @@ private:
// NOLINTNEXTLINE(*-rvalue-reference-param-not-moved)
void move_from_other(buffer&& other)
{
+ ASL_ASSERT(size() == 0 && !is_on_heap());
+
if (other.is_on_heap())
{
m_data = other.m_data;