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

[dcl.dcl] nodeclspec-function-declaration should probably allow trailing requires-clause #2321

Open
cpplearner opened this issue Sep 3, 2018 · 3 comments
Labels
cwg Issue must be reviewed by CWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking.

Comments

@cpplearner
Copy link
Contributor

Currently the grammar for nodeclspec-function-declaration is:

nodeclspec-function-declaration:
	attribute-specifier-seqopt declarator ;

This does not allow a requires-clause after declarator. This appears like an oversight when merging Concepts TS to C++20.

@jensmaurer
Copy link
Member

Is this editorial? It's changing the grammar in a normative way.

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Sep 4, 2018
@jensmaurer
Copy link
Member

Editorial meeting: No way this can be editorial.

@jensmaurer jensmaurer added cwg Issue must be reviewed by CWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking. and removed decision-required A decision of the editorial group (or the Project Editor) is required. labels Nov 6, 2018
@cpplearner
Copy link
Contributor Author

With explicit(cond) this becomes more funny:

operator T(); // is a nodeclspec-function-declaration
explicit(false) operator T(); // is a simple-declaration

so

operator T() requires true; // not permitted by the grammar
                            // though intuitively it should have the same meaning as below
explicit(false) operator T() requires true; // ok: the grammar permits it

I still think it's an obvious oversight.

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. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking.
Projects
None yet
Development

No branches or pull requests

2 participants