---
name: "std::aligned_union"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/std::aligned_union"
---

# std::aligned\_union(3)

Provide aligned storage for types.

## NAME

std::aligned\_union\< \_Len, \_Types \> - Provide aligned storage for types.

## SYNOPSIS

\#include \<type\_traits\>

### Public Types

using **type**\
 The storage.

### Static Public Attributes

static const size\_t **alignment\_value**\
 The value of the strictest alignment of \_Types.

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

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
