Standard layout class (struct, union) types offer three important benefits:
- offsetof only works for standard layout types
- pointer to a standard layout type and its first member are pointer-interconvertible
- if a standard layout union contains standard layout structs, the common initial sequence can be accessed even through non-active members
Compiler Explorer link: https://compiler-explorer.com/z/bo48G9r3G