OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::Allocator< Type, Alignment > Class Template Reference

メモリアライメント対応アロケータ More...

#include <Allocator.hpp>

Classes

struct  rebind
 

Public Types

using value_type = Type
 
using size_type = std::size_t
 
using difference_type = std::ptrdiff_t
 
using propagate_on_container_move_assignment = std::true_type
 
using is_always_equal = std::true_type
 

Public Member Functions

constexpr SIV3D_NODISCARD_CXX20 Allocator () noexcept=default
 
constexpr SIV3D_NODISCARD_CXX20 Allocator (const Allocator &) noexcept=default
 
template<class Other , size_t OtherAlignment>
constexpr SIV3D_NODISCARD_CXX20 Allocator (const Allocator< Other, OtherAlignment > &) noexcept
 
Type * allocate (size_t n)
 
void deallocate (Type *p, size_t)
 

Static Public Attributes

static constexpr size_t alignment = Alignment
 

Detailed Description

template<class Type, size_t Alignment = alignof(Type)>
class s3d::Allocator< Type, Alignment >

メモリアライメント対応アロケータ

Template Parameters
Typeアロケーションするオブジェクトの型
Alignmentアライメント(バイト)

Member Typedef Documentation

◆ difference_type

template<class Type , size_t Alignment = alignof(Type)>
using s3d::Allocator< Type, Alignment >::difference_type = std::ptrdiff_t

◆ is_always_equal

template<class Type , size_t Alignment = alignof(Type)>
using s3d::Allocator< Type, Alignment >::is_always_equal = std::true_type

◆ propagate_on_container_move_assignment

template<class Type , size_t Alignment = alignof(Type)>
using s3d::Allocator< Type, Alignment >::propagate_on_container_move_assignment = std::true_type

◆ size_type

template<class Type , size_t Alignment = alignof(Type)>
using s3d::Allocator< Type, Alignment >::size_type = std::size_t

◆ value_type

template<class Type , size_t Alignment = alignof(Type)>
using s3d::Allocator< Type, Alignment >::value_type = Type

Constructor & Destructor Documentation

◆ Allocator() [1/3]

template<class Type , size_t Alignment = alignof(Type)>
constexpr SIV3D_NODISCARD_CXX20 s3d::Allocator< Type, Alignment >::Allocator ( )
constexprdefaultnoexcept

◆ Allocator() [2/3]

template<class Type , size_t Alignment = alignof(Type)>
constexpr SIV3D_NODISCARD_CXX20 s3d::Allocator< Type, Alignment >::Allocator ( const Allocator< Type, Alignment > &  )
constexprdefaultnoexcept

◆ Allocator() [3/3]

template<class Type , size_t Alignment = alignof(Type)>
template<class Other , size_t OtherAlignment>
constexpr SIV3D_NODISCARD_CXX20 s3d::Allocator< Type, Alignment >::Allocator ( const Allocator< Other, OtherAlignment > &  )
inlineconstexprnoexcept

Member Function Documentation

◆ allocate()

template<class Type , size_t Alignment = alignof(Type)>
Type* s3d::Allocator< Type, Alignment >::allocate ( size_t  n)

◆ deallocate()

template<class Type , size_t Alignment = alignof(Type)>
void s3d::Allocator< Type, Alignment >::deallocate ( Type *  p,
size_t   
)

Member Data Documentation

◆ alignment

template<class Type , size_t Alignment = alignof(Type)>
constexpr size_t s3d::Allocator< Type, Alignment >::alignment = Alignment
staticconstexpr

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