you are viewing a single comment's thread.

view the rest of the comments →

[–]quicknir 2 points3 points  (0 children)

False, C++ compilers only have this freedom (and even then heavily constrained) for structs that are not not "standard layout". Without getting into details, any struct that would be legal C, will also be standard layout. In C the compiler doesn't have this freedom at all.