# C++ keyword: union

> C++ Atlas: `cppatlas.com/w/cpp/keyword/union` | Source: https://en.cppreference.com/w/cpp/keyword/union | Domain: Keywords | Standards: C++11

## Official Specification Summary (cppreference)

### Usage

- declaration of a union type
- If a function or a variable exists in scope with the name identical to the name of a union type, `union` can be prepended to the name for disambiguation, resulting in an elaborated type specifier

### See also

- [`class`](https://en.cppreference.com/w/cpp/keyword/class), [`struct`](https://en.cppreference.com/w/cpp/keyword/struct)

(since C++11):

- [`final`](https://en.cppreference.com/w/cpp/identifier_with_special_meaning/final)

---
Attribution: content from https://en.cppreference.com/w/cpp/keyword/union (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.