tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
aligned_union< Len, Types > Struct Template Reference

Provides the nested type type, which is a trivial standard-layout type of a size and alignment suitable for use as uninitialized storage for an object of any of the types listed in Types. The size of the storage is at least Len. aligned_union also determines the strictest (largest) alignment requirement among all Types and makes it available as the constant alignment_value. If sizeof...(Types) == 0 or if any of the types in Types is not a complete object type, the behavior is undefined. It is implementation-defined whether any extended alignment is supported. The behavior of a program that adds specializations for aligned_union is undefined. More...

#include <aligned_union.hpp>

Classes

struct  type
 

Static Public Attributes

static constexpr size_t alignment_value = detail::vmax(alignof(Types)...)
 

Detailed Description

template<size_t Len, typename... Types>
struct etl::aligned_union< Len, Types >

Provides the nested type type, which is a trivial standard-layout type of a size and alignment suitable for use as uninitialized storage for an object of any of the types listed in Types. The size of the storage is at least Len. aligned_union also determines the strictest (largest) alignment requirement among all Types and makes it available as the constant alignment_value. If sizeof...(Types) == 0 or if any of the types in Types is not a complete object type, the behavior is undefined. It is implementation-defined whether any extended alignment is supported. The behavior of a program that adds specializations for aligned_union is undefined.

Member Data Documentation

◆ alignment_value

template<size_t Len, typename... Types>
size_t alignment_value = detail::vmax(alignof(Types)...)
staticconstexpr

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