Template Class AlignedAllocator

Nested Relationships

Class Documentation

template<typename T, unsigned int Alignment>
class qhipster::AlignedAllocator

An allocator returning aligned memory.

This class provides an aligned C++98 and C++11 conforming allocator.

Pre

The alignment must be a power of 2.

Public Types

typedef T *pointer
typedef T const *const_pointer
typedef T &reference
typedef T const &const_reference
typedef T value_type
typedef std::size_t size_type
typedef std::ptrdiff_t difference_type

Public Functions

AlignedAllocator()
AlignedAllocator(AlignedAllocator const&)
template<typename U>
AlignedAllocator(AlignedAllocator<U, Alignment> const&)
pointer allocate(size_type n)
void deallocate(pointer p, size_type)
size_type max_size() const
void construct(pointer p, const_reference t)
template<typename C>
void destroy(C *c)
bool operator==(AlignedAllocator const&) const
bool operator!=(AlignedAllocator const&) const
template<typename U, unsigned int UAlignment>
bool operator==(AlignedAllocator<U, UAlignment> const&) const
template<typename U, unsigned int UAlignment>
bool operator!=(AlignedAllocator<U, UAlignment> const&) const
template<typename U>
struct rebind

Public Types

typedef AlignedAllocator<U, Alignment> other