GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
short_alloc< T, N, Align > Class Template Reference

#include <short_alloc.hpp>

Classes

struct  rebind

Public Types

using value_type = T
using arena_type = arena<size, alignment>

Public Member Functions

 short_alloc (const short_alloc &)=default
short_alloc & operator= (const short_alloc &)=delete
 short_alloc (arena_type &a) noexcept
template<class U>
 short_alloc (const short_alloc< U, N, alignment > &a) noexcept
T * allocate (std::size_t n)
void deallocate (T *p, std::size_t n) noexcept

Static Public Attributes

static auto constexpr alignment = Align
static auto constexpr size = N

Friends

template<class U, std::size_t M, std::size_t A>
class short_alloc
template<class T1, std::size_t N1, std::size_t A1, class U, std::size_t M, std::size_t A2>
bool operator== (const short_alloc< T1, N1, A1 > &x, const short_alloc< U, M, A2 > &y) noexcept

Member Typedef Documentation

◆ arena_type

template<class T, std::size_t N, std::size_t Align = alignof(std::max_align_t)>
using short_alloc< T, N, Align >::arena_type = arena<size, alignment>

◆ value_type

template<class T, std::size_t N, std::size_t Align = alignof(std::max_align_t)>
using short_alloc< T, N, Align >::value_type = T

Constructor & Destructor Documentation

◆ short_alloc() [1/3]

template<class T, std::size_t N, std::size_t Align = alignof(std::max_align_t)>
short_alloc< T, N, Align >::short_alloc ( const short_alloc< T, N, Align > & )
default

◆ short_alloc() [2/3]

template<class T, std::size_t N, std::size_t Align = alignof(std::max_align_t)>
short_alloc< T, N, Align >::short_alloc ( arena_type & a)
inlineexplicitnoexcept

◆ short_alloc() [3/3]

template<class T, std::size_t N, std::size_t Align = alignof(std::max_align_t)>
template<class U>
short_alloc< T, N, Align >::short_alloc ( const short_alloc< U, N, alignment > & a)
inlineexplicitnoexcept

Member Function Documentation

◆ allocate()

template<class T, std::size_t N, std::size_t Align = alignof(std::max_align_t)>
T * short_alloc< T, N, Align >::allocate ( std::size_t n)
inline
Here is the caller graph for this function:

◆ deallocate()

template<class T, std::size_t N, std::size_t Align = alignof(std::max_align_t)>
void short_alloc< T, N, Align >::deallocate ( T * p,
std::size_t n )
inlinenoexcept

◆ operator=()

template<class T, std::size_t N, std::size_t Align = alignof(std::max_align_t)>
short_alloc & short_alloc< T, N, Align >::operator= ( const short_alloc< T, N, Align > & )
delete

◆ operator==

template<class T, std::size_t N, std::size_t Align = alignof(std::max_align_t)>
template<class T1, std::size_t N1, std::size_t A1, class U, std::size_t M, std::size_t A2>
bool operator== ( const short_alloc< T1, N1, A1 > & x,
const short_alloc< U, M, A2 > & y )
friend

◆ short_alloc

template<class T, std::size_t N, std::size_t Align = alignof(std::max_align_t)>
template<class U, std::size_t M, std::size_t A>
friend class short_alloc
friend

Member Data Documentation

◆ alignment

template<class T, std::size_t N, std::size_t Align = alignof(std::max_align_t)>
auto constexpr short_alloc< T, N, Align >::alignment = Align
staticconstexpr

◆ size

template<class T, std::size_t N, std::size_t Align = alignof(std::max_align_t)>
auto constexpr short_alloc< T, N, Align >::size = N
staticconstexpr

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