From ddb0e7596279fde80245cbbd1b63de8bbf3c287b Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Fri, 2 Nov 2018 14:29:19 +1100 Subject: [PATCH] alloc/arena: add mutating accessor to underlying store --- alloc/arena.hpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/alloc/arena.hpp b/alloc/arena.hpp index 02f41f64..16c43044 100644 --- a/alloc/arena.hpp +++ b/alloc/arena.hpp @@ -128,11 +128,8 @@ namespace cruft::alloc { decltype(auto) reset (Args&&...args) { return m_store.reset (std::forward (args)...); } - /// Returns a const reference to the inner allocator. - /// - /// Do not return a non-const reference. If the user wants direct - /// access they should directly use a non-owning arena. auto const& store (void) const& { return m_store; } + auto & store (void) & { return m_store; } private: AllocT m_store;