Skip to content

Improve type punning

Gerhard Raven requested to merge typepunning into master
  • introduce pun_to for type punning
  • pun_to avoid the need to rely on C99 compatibility (accessing the 'non-active' member of a union is undefined behaviour in C++ -- but g++ behaves according to C99 in this respect)
  • also, remove unneeded #include
  • also, fully qualify enum values
Edited by Marco Cattaneo

Merge request reports