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

[class.mem.general] Allow non-defining declarations of nested classes. #4416

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jensmaurer
Copy link
Member

Fixes #4409

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 14, 2020

OK, but I'm not 100% sure this is editorial. Could we get CWG sign-off on this, or at least a second pair of core eyes?

@jensmaurer
Copy link
Member Author

@zygoloid , could you please take a look?

Copy link
Member

@zygoloid zygoloid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no doubt that this change reflects the CWG intent, and that the wording and example in [class.nest]p3 are correct.

As for whether that's enough to apply this editorially without explicit CWG oversight... perhaps it's worth sending an email past the core reflector to check if anyone would prefer this to be handled non-editorially.

Comment on lines +669 to +670
The \grammarterm{member-declarator-list} can be omitted only
after
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "can be omitted only after" is problematic phrasing -- it's unclear whether it's giving permission, stating a restriction, or both. (Can a member-declarator-list be omitted after any elaborated-type-specifier, or only some of them?) This is made a little worse by this change, because three of the four top-level grammar productions for elaborated-type-specifier aren't allowed in this context, per the end of [dcl.type.elab]p1. This might help:

The \grammarterm{member-declarator-list} shall not be omitted unless
the declaration is a friend declaration or its sole constituent is

  • ...

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 14, 2020

Thanks a lot! That seems clear, let's put this on the CWG list and get sign-off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cwg Issue must be reviewed by CWG.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[class.mem.general]/12 seems to conflict with [class.nest]/3
3 participants