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 >:

## 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>

void * Dune::AlignedBase< align, Impl >::operator new | ( | std::size_t | count,
|  | void * | ptr )

inline static

Overload of placement new.

Checks if address is misaligned and forwards to global new

Parameters

  count | number of elements to allocate
  ptr | address of the placement new

Returns
  void* the address where the object is placed

## operator new[]()

template<std::size_t align, class Impl>

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

inline static

Overload of placement new[].

Checks if address is misaligned and forwards to global new

Parameters

  count | number of elements to allocate
  ptr | address of the placement new

Returns
  void* the address where the object is placed

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

- debugalign.hh