3 ms·
>it's fine to have non-POD unions Only from C++11 (or is it later?). So a problem was created by relaxing the existing requirements for a "union" to which a so
by rramadass 4y ago
>it's fine to have non-POD unions
Only from C++11 (or is it later?). So a problem was created by relaxing the existing requirements for a "union" to which a solution was proposed by adding a "variant"? Something which had no runtime overhead (but UB) now has runtime overheads.
Regarding your point about "sum types", agreed.