tenno 0.1.0
Loading...
Searching...
No Matches
tenno::allocator< T > Struct Template Reference

#include <memory.hpp>

Public Types

using value_type = T
 
using pointer = T *
 
using const_pointer = const T *
 
using reference = T &
 
using const_referemce = const T &
 
using size_type = tenno::size
 

Public Member Functions

 allocator () noexcept=default
 
template<class U >
 allocator (const allocator< U > &) noexcept
 
T * allocate (tenno::size n)
 
void deallocate (T *p, tenno::size n)
 
constexpr bool operator== (const allocator &) const noexcept
 
constexpr bool operator!= (const allocator &) const noexcept
 

Detailed Description

template<class T>
struct tenno::allocator< T >

Definition at line 31 of file memory.hpp.

Member Typedef Documentation

◆ const_pointer

template<class T >
using tenno::allocator< T >::const_pointer = const T *

Definition at line 35 of file memory.hpp.

◆ const_referemce

template<class T >
using tenno::allocator< T >::const_referemce = const T &

Definition at line 37 of file memory.hpp.

◆ pointer

template<class T >
using tenno::allocator< T >::pointer = T *

Definition at line 34 of file memory.hpp.

◆ reference

template<class T >
using tenno::allocator< T >::reference = T &

Definition at line 36 of file memory.hpp.

◆ size_type

template<class T >
using tenno::allocator< T >::size_type = tenno::size

Definition at line 38 of file memory.hpp.

◆ value_type

template<class T >
using tenno::allocator< T >::value_type = T

Definition at line 33 of file memory.hpp.

Constructor & Destructor Documentation

◆ allocator() [1/2]

template<class T >
tenno::allocator< T >::allocator ( )
defaultnoexcept

◆ allocator() [2/2]

template<class T >
template<class U >
tenno::allocator< T >::allocator ( const allocator< U > & )
inlinenoexcept

Definition at line 41 of file memory.hpp.

Member Function Documentation

◆ allocate()

template<class T >
T * tenno::allocator< T >::allocate ( tenno::size n)
inline

Definition at line 45 of file memory.hpp.

◆ deallocate()

template<class T >
void tenno::allocator< T >::deallocate ( T * p,
tenno::size n )
inline

Definition at line 50 of file memory.hpp.

◆ operator!=()

template<class T >
bool tenno::allocator< T >::operator!= ( const allocator< T > & ) const
inlineconstexprnoexcept

Definition at line 60 of file memory.hpp.

◆ operator==()

template<class T >
bool tenno::allocator< T >::operator== ( const allocator< T > & ) const
inlineconstexprnoexcept

Definition at line 55 of file memory.hpp.


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