| Start |
|---|
Undefined Behavior |
| Basic Union Features Unions are a specialized struct within which all members occupy overlapping memory. |
| Typical Use Unions are useful for minimizing memory usage for exclusive data, such as when implementing mixed data types. RemarksUnions are very useful tools, but come with a few important caveats: A [`std::variant`](http://en.cppreference.com/w/cpp/utility/variant) (since C++17) is like a union, only it tells you what it currently contains (part of its visible state is the type of the value it holds at a given moment: it enforces value access happening only to that type). |
Read Article
https://develop.horje.com/learn/1434/reference