Template Class StackArena

Class Documentation

template<size_t Size>
class wrench::StackArena

Defines a stack-based memory arena of a specific size.

Template Parameters
  • Size: The size of the stack for the arena.

Public Types

using Ptr = void*

Pointer type.

using ConstPtr = const void*

Const pointer type.

Public Functions

StackArena(size_t size = 0)

Constructor which takes the size of the arena. This is provided to arena’s have the same interface.

Parameters
  • size: The size of the arena.

wrench_no_discard auto begin () const noexcept -> ConstPtr

Returns a pointer to the beginning of the arena.

wrench_no_discard auto end () const noexcept -> ConstPtr

Returns a pointer to the end of the arena.

constexpr wrench_no_discard auto size () const noexcept -> size_t

Returns the size of the arena.

Public Static Attributes

constexpr bool contexpr_size = true

Returns that the allocator has a constexpr size.