std::aligned_union< _Len, _Types > Struct Template Reference
Utilities » Metaprogramming

`#include <type_traits>`

## Public Types

typedef aligned_storage< _S_len, alignment_value >::type | type

## Static Public Attributes

static const size_t | alignment_value

## Detailed Description

template<size_t _Len, typename... _Types>
struct std::aligned_union< _Len, _Types >

Provide aligned storage for types.

[meta.trans.other]

Provides aligned storage for any of the provided types of at least size _Len.

See also
  aligned_storage

Deprecated
  Deprecated in C++23.

Definition at line 2140 of file type_traits.

## Member Typedef Documentation

## type

template<size_t _Len, typename... _Types>

typedef aligned_storage<_S_len,alignment_value>::type std::aligned_union< _Len, _Types >::type

The storage.

Definition at line 2154 of file type_traits.

## Member Data Documentation

## alignment_value

template<size_t _Len, typename... _Types>

const size_t std::aligned_union< _Len, _Types >::alignment_value

static

The value of the strictest alignment of _Types.

Definition at line 2152 of file type_traits.

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

- type_traits