On Thu, 2024-08-22 at 21:24 +0200, Alejandro Colomar wrote: > > ...except transparent unions are C-only, so we'd need something else > > for C++ if we went with this for C. > > Why don't they have transparent unions in C++? Is it just that nobody > cared to implement them? Or do they have inherent problems there? In C++ you can write something like union X { int x; float y; X(int _x) : x(_x) {} X(float _y) : y(_y) {} }; anyway. -- Xi Ruoyao <xry111@xxxxxxxxxxx> School of Aerospace Science and Technology, Xidian University