Akim Demaille <[EMAIL PROTECTED]> writes: > with both cases starting by a Boolean was a bit troublesome. I do > understand that this allows shorter and simpler names, simple > assignments, but it is a bit unusual (to my eyes). Could it be also > to optimize in some way to size of the union?
In general, yes, because it removes the need for the C compiler to align the first non-bool member to the strictest alignment of all the later members. Hence the resulting union might be smaller. It's common usage and it conforms to the C Standard. Also, if memory serves (I'm not a C++ expert), C++ caters to this usage as well. If it's merely a style issue, I'd leave things be.
