Closed MoamenAbdelsattar closed 1 year ago
In C++, it's actually not allowed to read a different union member than the one that was last written to; while this may work in practice, it's in fact disallowed. (And that's in part why the current implementation is the way it is.)
Some discussion here: https://stackoverflow.com/a/11996970.
Thank you for explanation!
In C++, it's actually not allowed to read a different union member than the one that was last written to; while this may work in practice, it's in fact disallowed. (And that's in part why the current implementation is the way it is.)
Some discussion here: https://stackoverflow.com/a/11996970.