Title
Unclear context describing ambiguity
Status
c++17
Section
9.3.3 [dcl.ambig.res]
Submitter
Richard Smith

Created on 2016-04-12.00:00:00 last changed 74 months ago

Messages

Date: 2017-01-15.00:00:00

Proposed resolution (January, 2017):

Change 9.3.3 [dcl.ambig.res] paragraph 3 as follows:

Another ambiguity arises in a parameter-declaration-clause of a function declaration, or in a type-id that is the operand of a sizeof or typeid operator, when a type-name is nested in parentheses. In this case, the choice is between the declaration of a parameter of type pointer to function and the declaration of a parameter with redundant parentheses around the declarator-id. The resolution is to consider the type-name as a simple-type-specifier rather than a declarator-id. [Example:...
Date: 2017-02-15.00:00:00

[Adopted at the February/March, 2017 meeting.]

According to 9.3.3 [dcl.ambig.res] paragraph 3,

Another ambiguity arises in a parameter-declaration-clause of a function declaration, or in a type-id that is the operand of a sizeof or typeid operator, when a type-name is nested in parentheses.

There are two problems here: first, a parameter-declaration-clause appears in a lambda-expression, not just in a function declaration. Second, the ambiguity can arise in a type-id appearing in any context, not just in a sizeof or typeid expression.

History
Date User Action Args
2018-02-27 00:00:00adminsetstatus: tentatively ready -> c++17
2017-02-06 00:00:00adminsetmessages: + msg5739
2016-04-12 00:00:00admincreate