Foundation
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Foundation::Core::ScopedArena Struct Reference

RAII wrapper for an arena allocated from an Allocator. More...

#include <Allocator.hpp>

Public Member Functions

 ScopedArena (Allocator *res, size_t size, size_t alignment=alignof(std::max_align_t))
 
 ~ScopedArena ()
 
constexpr operator Arena () const
 
constexpr operator bool () const noexcept
 

Public Attributes

Allocatorresource
 
Arena arena
 

Detailed Description

RAII wrapper for an arena allocated from an Allocator.

Constructor & Destructor Documentation

◆ ScopedArena()

Foundation::Core::ScopedArena::ScopedArena ( Allocator res,
size_t  size,
size_t  alignment = alignof(std::max_align_t) 
)
inline

◆ ~ScopedArena()

Foundation::Core::ScopedArena::~ScopedArena ( )
inline

Member Function Documentation

◆ operator Arena()

constexpr Foundation::Core::ScopedArena::operator Arena ( ) const
inlineconstexpr

◆ operator bool()

constexpr Foundation::Core::ScopedArena::operator bool ( ) const
inlineconstexprnoexcept

Member Data Documentation

◆ arena

Arena Foundation::Core::ScopedArena::arena

◆ resource

Allocator* Foundation::Core::ScopedArena::resource

The documentation for this struct was generated from the following file: