Just recieved an error message that said “union __anonymous can only be a part of an aggregate”. I’m not really puzzled about it because I was trying something that I knew shouldn’t work.
But it makes me wonder what the exact definition is of an “aggregate” in D. I’m guessing it is a type that can contain other types, like an array, struct or class. Or is there more to it than that?
An aggregate is a struct or class. The idea is that you can’t have an anonymous union as a local or global variable, only as a member of an object.