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.ambig.res] Ambiguity resolution for function and object declarations is ambiguous CWG2620 #2831
Comments
|
I believe the intended interpretation is "the resolution is to consider the longest sequence of tokens that could possibly constitute a declarator to form a declarator". (In your example, the I'd like CWG to look at this, in case my belief above is incorrect :) |
My understanding is that the ambiguity arises because [dcl.dcl]/10 seems to suggest that anything that's not a typedef declaration or function declaration is a object declaration, so it does seem to cover declaration of a reference. |
Both of your interpretations work, but I believe the wording should be changed in order to make it clearer as to what it means. |
I think this is #1280 |
http://eel.is/c++draft/dcl.decl#dcl.ambig.res-1 (Ambiguity resolution for function/object declaration) states that:
and
Both a function declaration and an object declaration are declarations, so it is unclear which will be chosen.
The text was updated successfully, but these errors were encountered: