Comment by grandempire

2 days ago

That’s for C++. And how is std::variant implemented?

not using a union: https://ojdip.net/2013/10/implementing-a-variant-type-in-cpp... because the union can't be extended with variadic template types