Anklang C++ API 0.0.0
Loading...
Searching...
No Matches
AlignedPOD< SIZE >

#include "randomhash.hh"

Public Attributes

std::aligned_storage< SIZE, 16 >::typemem

Detailed Description

template<size_t SIZE>
struct Ase::AlignedPOD< SIZE >

Helper to provide memory for placement new AlignedPOD<SIZE> is aligned like max_align_t or like malloc()-ed memory and provides SIZE bytes. Idiomatic use is:

static AlignedPOD<sizeof (std::string)> pod_mem;
std::string *str = new (&pod_mem) std::string();
Definition randomhash.hh:19

Member Data Documentation

mem

template<size_t SIZE>
std::aligned_storage<SIZE,16>::type mem