Category : anonymous-struct

A previous post of mine raised the topic of anonymous structs, with several commentators saying these were not allowed in C++. Here is a construction that I use a lot: is this legal C++? const int HeaderSize = 8192; struct Header { union { struct { int r; // other members }; unsigned char unused[HeaderSize]; ..

Read more