Opm::aligned_allocator< T, Alignment > Class Template Reference

#include <alignedallocator.hh>

Classes

struct  rebind
 

Public Types

using value_type = T
 
using pointer = T *
 
using const_pointer = const T *
 
using void_pointer = void *
 
using const_void_pointer = const void *
 
using size_type = std::size_t
 
using difference_type = std::ptrdiff_t
 
using reference = T &
 
using const_reference = const T &
 

Public Member Functions

 aligned_allocator () noexcept=default
 
template<class U >
 aligned_allocator (const aligned_allocator< U, Alignment > &) noexcept
 
pointer address (reference value) const noexcept
 
const_pointer address (const_reference value) const noexcept
 
pointer allocate (size_type size, const_void_pointer=0)
 
void deallocate (pointer ptr, size_type)
 
constexpr size_type max_size () const noexcept
 
template<class U , class... Args>
void construct (U *ptr, Args &&... args)
 
template<class U >
void construct (U *ptr)
 
template<class U >
void destroy (U *ptr)
 

Member Typedef Documentation

◆ const_pointer

template<class T , std::size_t Alignment>
using Opm::aligned_allocator< T, Alignment >::const_pointer = const T*

◆ const_reference

template<class T , std::size_t Alignment>
using Opm::aligned_allocator< T, Alignment >::const_reference = const T&

◆ const_void_pointer

template<class T , std::size_t Alignment>
using Opm::aligned_allocator< T, Alignment >::const_void_pointer = const void*

◆ difference_type

template<class T , std::size_t Alignment>
using Opm::aligned_allocator< T, Alignment >::difference_type = std::ptrdiff_t

◆ pointer

template<class T , std::size_t Alignment>
using Opm::aligned_allocator< T, Alignment >::pointer = T*

◆ reference

template<class T , std::size_t Alignment>
using Opm::aligned_allocator< T, Alignment >::reference = T&

◆ size_type

template<class T , std::size_t Alignment>
using Opm::aligned_allocator< T, Alignment >::size_type = std::size_t

◆ value_type

template<class T , std::size_t Alignment>
using Opm::aligned_allocator< T, Alignment >::value_type = T

◆ void_pointer

template<class T , std::size_t Alignment>
using Opm::aligned_allocator< T, Alignment >::void_pointer = void*

Constructor & Destructor Documentation

◆ aligned_allocator() [1/2]

template<class T , std::size_t Alignment>
Opm::aligned_allocator< T, Alignment >::aligned_allocator ( )
defaultnoexcept

◆ aligned_allocator() [2/2]

template<class T , std::size_t Alignment>
template<class U >
Opm::aligned_allocator< T, Alignment >::aligned_allocator ( const aligned_allocator< U, Alignment > &  )
inlinenoexcept

Member Function Documentation

◆ address() [1/2]

template<class T , std::size_t Alignment>
const_pointer Opm::aligned_allocator< T, Alignment >::address ( const_reference  value) const
inlinenoexcept

◆ address() [2/2]

template<class T , std::size_t Alignment>
pointer Opm::aligned_allocator< T, Alignment >::address ( reference  value) const
inlinenoexcept

◆ allocate()

template<class T , std::size_t Alignment>
pointer Opm::aligned_allocator< T, Alignment >::allocate ( size_type  size,
const_void_pointer  = 0 
)
inline

References Opm::aligned_alloc().

◆ construct() [1/2]

template<class T , std::size_t Alignment>
template<class U >
void Opm::aligned_allocator< T, Alignment >::construct ( U *  ptr)
inline

◆ construct() [2/2]

template<class T , std::size_t Alignment>
template<class U , class... Args>
void Opm::aligned_allocator< T, Alignment >::construct ( U *  ptr,
Args &&...  args 
)
inline

◆ deallocate()

template<class T , std::size_t Alignment>
void Opm::aligned_allocator< T, Alignment >::deallocate ( pointer  ptr,
size_type   
)
inline

References Opm::aligned_free().

◆ destroy()

template<class T , std::size_t Alignment>
template<class U >
void Opm::aligned_allocator< T, Alignment >::destroy ( U *  ptr)
inline

◆ max_size()

template<class T , std::size_t Alignment>
constexpr size_type Opm::aligned_allocator< T, Alignment >::max_size ( ) const
inlineconstexprnoexcept

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