From bc03b36ffc655431b6ff622b499e39d5850754e7 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sat, 22 Sep 2018 12:40:13 +1000 Subject: [PATCH] alloc/raw/linear: explain why begin/end members aren't const --- alloc/raw/linear.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/alloc/raw/linear.hpp b/alloc/raw/linear.hpp index ab2e19c1..b3e00220 100644 --- a/alloc/raw/linear.hpp +++ b/alloc/raw/linear.hpp @@ -99,8 +99,11 @@ namespace cruft::alloc::raw { size_t remain (void) const; protected: + // The begin and end iterators should be constant but that interferes + // with move operators so we need to leave them mutable. std::byte *m_begin; std::byte *m_end; + std::byte *m_cursor; }; }