AlignedStorage< SIZE, ALIGN > Struct Template Reference

#include <apibase.h>

Detailed Description

template<Int SIZE, Int ALIGN>
struct maxon::AlignedStorage< SIZE, ALIGN >

AlignedStorage<SIZE, ALIGN> is a trivial standard-layout class which has the given size and alignment. It is a replacement for std::aligned_storage<SIZE, ALIGN>::type with the benefit that the usual implementation of std::aligned_storage makes some compilers produce extra stack protector code which often if superfluous. AlignedStorage avoids this, so you should prefer AlignedStorage if you are sure that no invalid memory access can happen.

Public Attributes

EmptyClass _data [SIZE]

Member Data Documentation

◆ _data

EmptyClass _data[SIZE]