Hacker News new | ask | show | jobs
by MountainTheme12 123 days ago
In my C++ all members of a union are always active.
2 comments

Right? The cited use case is undefined behavior.

Actually I can't think of a single realistic use case for this; despite the constant trumpeting of C++ folks on how constexpr will save C++, constant expressions are just too limited for this to matter.

It's the only way to live. Strict aliasing rule? Always disabled.