libvisual  0.5.0
Classes | Public Types | Public Member Functions | List of all members
LV::AlignedAllocator< T, alignment > Struct Template Reference

Aligned memory allocator. More...

#include <libvisual/lv_aligned_allocator.hpp>

Classes

struct  rebind
 

Public Types

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

Public Member Functions

template<typename U >
 AlignedAllocator (AlignedAllocator< U, alignment > &)
 
pointer address (reference x) const
 
const_pointer address (const_reference x) const
 
pointer allocate (size_type n, typename AlignedAllocator< void, alignment >::pointer=nullptr)
 
void deallocate (pointer ptr, size_type) noexcept
 
size_type max_size () const
 
void construct (pointer p, const_reference x)
 
void destroy (pointer p)
 

Detailed Description

template<typename T, std::size_t alignment>
struct LV::AlignedAllocator< T, alignment >

Aligned memory allocator.

Template Parameters
Ttype of object to allocate
alignmentalignment boundary

AlignedAllocator is an implementation of the C++ Allocator concept for use with standard library containers.

Definition at line 12 of file lv_aligned_allocator.hpp.


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