aligned_allocator< T, Alignment > Class Template Reference

Aligned allocator for STL containers. More...

#include <align.h>

Classes

struct  rebind
 

Public Types

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

Public Member Functions

T * address (T &r) const
 
const T * address (const T &s) const
 
std::size_t max_size () const
 
bool operator!= (const aligned_allocator &other) const
 
void construct (T *const p, const T &t) const
 
void destroy (T *const p) const
 
bool operator== (const aligned_allocator &other) const
 
 aligned_allocator (const aligned_allocator &)
 
template<typename U >
 aligned_allocator (const aligned_allocator< U, Alignment > &)
 
T * allocate (const std::size_t n) const
 
void deallocate (T *const p, const std::size_t) const
 
template<typename U >
T * allocate (const std::size_t n, const U *) const
 

Detailed Description

template<typename T, std::size_t Alignment>
class aligned_allocator< T, Alignment >

Aligned allocator for STL containers.

Template Parameters
TData type.
AlignmentAlignment.