dune-common 2.10
Loading...
Searching...
No Matches
Dune::AlignedBase< align, Impl > Struct Template Reference

CRTP base mixin class to check alignment. More...

#include <dune/common/debugalign.hh>

Inheritance diagram for Dune::AlignedBase< align, Impl >:
Inheritance graph

Static Public Member Functions

static void * operator new (std::size_t count, void *ptr)
 Overload of placement new.
 
static void * operator new[] (std::size_t count, void *ptr)
 Overload of placement new[].
 

Detailed Description

template<std::size_t align, class Impl>
struct Dune::AlignedBase< align, Impl >

CRTP base mixin class to check alignment.

Member Function Documentation

◆ operator new()

template<std::size_t align, class Impl >
static void * Dune::AlignedBase< align, Impl >::operator new ( std::size_t count,
void * ptr )
inlinestatic

Overload of placement new.

Checks if address is misaligned and forwards to global new

Parameters
countnumber of elements to allocate
ptraddress of the placement new
Returns
void* the address where the object is placed

◆ operator new[]()

template<std::size_t align, class Impl >
static void * Dune::AlignedBase< align, Impl >::operator new[] ( std::size_t count,
void * ptr )
inlinestatic

Overload of placement new[].

Checks if address is misaligned and forwards to global new

Parameters
countnumber of elements to allocate
ptraddress of the placement new
Returns
void* the address where the object is placed

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