Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 'anonymous union object' where appropriate. #1868

Closed
wants to merge 1 commit into from

Conversation

jensmaurer
Copy link
Member

The term was introduced by CWG 1860.

Fixes #973.

The term was introduced by CWG 1860.
@jensmaurer
Copy link
Member Author

I'm slightly uneasy with this change, because it claims that objects have members, but we often discuss properties at the level of the type here, not at the level of a specific object.

@zygoloid
Copy link
Member

I think the uneasiness is ultimately due to the term being inappropriate -- "anonymous union object" makes sense for namespace-scope or block-scope anonymous unions, but at class scope we're not defining an object. I wonder if it would be better to define the term "anonymous union member" in [class.union.anon] for the class-scope case.

Maybe something like this:

A union of the form

union { member-specification } ;

is called an anonymous union; it defines an unnamed type and an unnamed variable or non-static data member of that type. A non-static data member of anonymous union type is called an anonymous union member. An object of anonymous union type (either an unnamed variable introduced by an anonymous union declaration or a member subobject corresponding to an anonymous union member) is called an anonymous union object.

... though we'll need to check through the other references to "anonymous union object" to see whether they need changing too.

What do you think?

@jensmaurer
Copy link
Member Author

Sounds better, although we tended to avoid "anonymous union member" in the past because of ambiguity: a member of an anonymous union, or a member that is an anonymous union?

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Feb 12, 2018
@jensmaurer jensmaurer removed the decision-required A decision of the editorial group (or the Project Editor) is required. label Mar 16, 2018
@jensmaurer
Copy link
Member Author

Editorial meeting consensus: not a net improvement.

@jensmaurer jensmaurer closed this Mar 16, 2018
@jensmaurer jensmaurer deleted the b7 branch October 9, 2018 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants