|
dune-common 2.10
|
Allocators which guarantee alignment of the memory. More...
#include <dune/common/alignedallocator.hh>

Classes | |
| struct | rebind |
Public Types | |
| using | pointer = typename MallocAllocator<T>::pointer |
| using | size_type = typename MallocAllocator<T>::size_type |
| typedef std::ptrdiff_t | difference_type |
| typedef const T * | const_pointer |
| typedef T & | reference |
| typedef const T & | const_reference |
| typedef T | value_type |
Public Member Functions | |
| pointer | allocate (size_type n, const void *hint=0) |
| allocate n objects of type T | |
| pointer | address (reference x) const |
| const_pointer | address (const_reference x) const |
| void | deallocate (pointer p, size_type n) |
| deallocate n objects of type T at address p | |
| size_type | max_size () const noexcept |
| max size for allocate | |
| void | construct (pointer p, const T &val) |
| copy-construct an object of type T (i.e. make a placement new on p) | |
| template<typename ... Args> | |
| void | construct (pointer p, Args &&... args) |
| construct an object of type T from variadic parameters | |
| void | destroy (pointer p) |
| destroy an object of type T (i.e. call the destructor) | |
Static Public Attributes | |
| static constexpr int | alignment = fixAlignment(sizeof(void*)) |
Allocators which guarantee alignment of the memory.
| T | type of the object one wants to allocate |
| Alignment | explicitly specify the alignment, by default it is std::alignment_of<T>::value |
|
inherited |
|
inherited |
|
inherited |
| using Dune::AlignedAllocator< T, Alignment >::pointer = typename MallocAllocator<T>::pointer |
|
inherited |
| using Dune::AlignedAllocator< T, Alignment >::size_type = typename MallocAllocator<T>::size_type |
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
allocate n objects of type T
|
inlineinherited |
construct an object of type T from variadic parameters
|
inlineinherited |
copy-construct an object of type T (i.e. make a placement new on p)
|
inlineinherited |
deallocate n objects of type T at address p
|
inlineinherited |
destroy an object of type T (i.e. call the destructor)
|
inlinenoexceptinherited |
max size for allocate
|
staticconstexpr |