|
|
|
|
|
by AaronBallman
2260 days ago
|
|
I think that may be inaccurate -- IIRC, in C, you can do type punning via a union but not memcpy, and in C++ you can do type punning via memcpy but not a union and this incompatibility drives me nuts because it makes inline functions in a header file shared between C and C++ really messy. (Moral of the story: don't pun types.) |
|
https://port70.net/~nsz/c/c11/n1570.html#6.5p6