A union is a struct [C++ struct] in which all members are allocated at the same address so the union occupies only as much space as its largest member.

(Stroustrup 2022)

Bibliography

Stroustrup, Bjarne. 2022. A Tour of C++. Third. C++ in-Depth Series. Boston: Addison-Wesley.