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
The wording in [dcl.fct.def.general]/2 doesn't seem to be right. #4604
Comments
A declarator may be parenthesized as described in [dcl.meaning.general] p8. Therefore, this sentence ensures that parenthesized declarators are allowed. |
"A declarator may be parenthesized as described in [dcl.meaning.general] p8." [dcl.fct.def.general]/2 is about declarator, but [dcl.meaning.general]/8 is about declarator-id not declarator. "Therefore, this sentence ensures that parenthesized declarators are allowed." I simply cannot understand the relationship between the alluded sentence and what you wrote above. Could you elaborate? |
[dcl.meaning.general] p8 "In a declaration T D where D has the form ..." Compare with [dcl.meaning.general] p5, which says that "D" is a declarator. Note that p8 talks about the declarator-id (possibly deep) inside D and assumes the understanding of p5. |
"Compare with [dcl.meaning.general] p5, which says that "D" is a declarator. Note that p8 talks about the declarator-id (possibly deep) inside D and assumes the understanding of p5." Ok, I can accept this. But how does the sentence highlighted in my first post ensure that parenthesized declarators are allowed? |
Because it says that "T declarator" (with T=void or absent), with the declarator from the constructor grammar, must be a valid function declaration. In order to analyze this, you need to iterate through [dcl.meaning], which (among other things) takes care of "T (declarator)". |
It definitely doesn't tell me anything. I'm giving up ! |
[dcl.fct.def.general]/2:
What does the sentence highlighted above has to do with the fact that a parenthesized declarator should be accepted in a function-definition? See DR2145 about this.
See also my question in SO and this comment by T.C..
The text was updated successfully, but these errors were encountered: