logoalt Hacker News

Panzerschrek • today at 7:54 AM • 0 replies • view on HN

Typical C approach. In C++ this should be done with std::variant instead. It has the exact same binary layout, but is type-safe (compared to union usage).