Dune Core Modules (2.6.0)

Dune::AlignedAllocator< T, Alignment > Class Template Reference

Allocators which guarantee alignment of the memory. More...

#include <dune/common/alignedallocator.hh>

Public Member Functions

pointer allocate (size_type n, const void *hint=0)
 allocate n objects of type T
 
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)
 

Detailed Description

template<class T, int Alignment = -1>
class Dune::AlignedAllocator< T, Alignment >

Allocators which guarantee alignment of the memory.

Template Parameters
Ttype of the object one wants to allocate
Alignmentexplicitly specify the alignment, by default it is std::alignment_of<T>::value

The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 26, 23:30, 2024)