alloc/arena: add inner allocator accessor

This commit is contained in:
Danny Robson 2018-10-04 17:57:17 +10:00
parent 1fc7e562c7
commit 179c8bead4

View File

@ -128,6 +128,12 @@ namespace cruft::alloc {
decltype(auto) reset (Args&&...args)
{ return m_store.reset (std::forward<Args> (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; }
private:
AllocT m_store;
arena<AllocT> m_arena;