[class.union.anon] Correct definition of union-like class - #9281
[class.union.anon] Correct definition of union-like class#9281TymianekPL wants to merge 1 commit into
Conversation
|
I don't think there's something objectively wrong here. "union" is a defined term in https://eel.is/c++draft/class.union.general#def:union Saying "union or class" is clunky though. My preference is "class type", if we want a change, but just "class" is also fine by me. |
|
I suppose a synonym term for "Correct" could be used? But I'm not sure which one reflects the intent better... |
|
I thought it was meant to be read like "A union-like class is a union or (a class that has an anonymous union as a direct member)." rather than "A union-like class is (a union or a class) that has an anonymous union as a direct member.". |
|
Okay turns out that union-like class is just a leftover from old wording that doesn't exist anymore Should we remove this definition as it's unused? |
Oh yeah, that reading makes much more sense. Perhaps it could be clarified by "is a union or is a class" |
At the end of the paragraph, it says
So the "union-like class" term may not be used elsewhere, but it's used internally. |
|
Oh right true, interesting... |
There is a redundant union or, as all unions are classed.