This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 114a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-04-18


1814. Default arguments in lambda-expressions

Section: 9.3.4.7  [dcl.fct.default]     Status: CD4     Submitter: Jonathan Caves     Date: 2013-11-21

[Moved to DR at the November, 2014 meeting.]

The resolution for issue 974 permitting default arguments in lambda-expressions overlooked 9.3.4.7 [dcl.fct.default] paragraph 3:

A default argument shall be specified only in the parameter-declaration-clause of a function declaration or in a template-parameter (13.2 [temp.param])...

Proposed resolution (February, 2014):

Change 9.3.4.7 [dcl.fct.default] paragraph 3 as follows:

A default argument shall be specified only in the parameter-declaration-clause of a function declaration or lambda-declarator or in a template-parameter (13.2 [temp.param]); in the latter case, the initializer-clause shall be an assignment-expression. A default argument shall not be specified for a parameter pack. If it is specified in a parameter-declaration-clause, it shall not occur within a declarator or abstract-declarator of a parameter-declaration.103