Template Class AlignedAllocator#

Nested Relationships#

Nested Types#

Class Documentation#

template<typename T, size_t Alignment>
class AlignedAllocator#

AlignedAllocator used to allocate memory on the specified alignment.

Template Parameters
  • T – element type to allocate.

  • Alignment – alignment to allocate on.

Public Types

typedef T value_type#

Allocated value type

Public Functions

AlignedAllocator() = default#
template<typename U>
inline constexpr AlignedAllocator(const AlignedAllocator<U, Alignment>&) noexcept#
inline T *allocate(size_t n)#

Allocate elements from memory

Parameters

n – amount of T’s to allocate.

inline void deallocate(T *data, size_t n) noexcept#

Deallocate elements from memory

Parameters
  • data – data pointer to deallocate.

  • n – amount of elements to deallocate from the data pointer.

inline bool operator==(const AlignedAllocator&)#
inline bool operator!=(const AlignedAllocator&)#
template<typename U>
struct rebind#

Struct for rebinding other instances of this allocator

Public Types

typedef AlignedAllocator<U, Alignment> other#