FE 0.8.0
Header-only C++ frontend library
Loading...
Searching...
No Matches
fe::Arena::Allocator< T > Struct Template Reference

An allocator in order to use this Arena for containers. More...

#include <fe/arena.h>

Public Types

using value_type = T

Public Member Functions

 Allocator ()=delete
template<class U>
constexpr Allocator (const Arena::Allocator< U > &allocator) noexcept
constexpr Allocator (Arena &arena) noexcept
constexpr T * allocate (size_t num_elems)
constexpr void deallocate (T *, size_t) noexcept
template<class U>
constexpr bool operator== (const Allocator< U > &a) const noexcept
template<class U>
constexpr bool operator!= (const Allocator< U > &a) const noexcept

Public Attributes

Arenaarena

Detailed Description

template<class T>
struct fe::Arena::Allocator< T >

An allocator in order to use this Arena for containers.

Construct it via Arena::allocator.

Definition at line 49 of file arena.h.

Member Typedef Documentation

◆ value_type

template<class T>
using fe::Arena::Allocator< T >::value_type = T

Definition at line 50 of file arena.h.

Constructor & Destructor Documentation

◆ Allocator() [1/3]

template<class T>
fe::Arena::Allocator< T >::Allocator ( )
delete

Referenced by operator!=(), and operator==().

◆ Allocator() [2/3]

template<class T>
template<class U>
fe::Arena::Allocator< T >::Allocator ( const Arena::Allocator< U > & allocator)
inlineconstexprnoexcept

Definition at line 55 of file arena.h.

References fe::Arena::allocator().

◆ Allocator() [3/3]

template<class T>
fe::Arena::Allocator< T >::Allocator ( Arena & arena)
inlineconstexprnoexcept

Definition at line 57 of file arena.h.

References fe::Arena::Arena(), and arena.

Member Function Documentation

◆ allocate()

template<class T>
T * fe::Arena::Allocator< T >::allocate ( size_t num_elems)
inlinenodiscardconstexpr

Definition at line 60 of file arena.h.

References arena.

◆ deallocate()

template<class T>
void fe::Arena::Allocator< T >::deallocate ( T * ,
size_t  )
inlineconstexprnoexcept

Definition at line 62 of file arena.h.

◆ operator!=()

template<class T>
template<class U>
bool fe::Arena::Allocator< T >::operator!= ( const Allocator< U > & a) const
inlineconstexprnoexcept

Definition at line 69 of file arena.h.

References Allocator(), and arena.

◆ operator==()

template<class T>
template<class U>
bool fe::Arena::Allocator< T >::operator== ( const Allocator< U > & a) const
inlineconstexprnoexcept

Definition at line 65 of file arena.h.

References Allocator(), and arena.

Member Data Documentation

◆ arena

template<class T>
Arena& fe::Arena::Allocator< T >::arena

Definition at line 73 of file arena.h.

Referenced by allocate(), Allocator(), operator!=(), and operator==().


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