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

2024-03-20


767. void and other unnamed lambda-parameters

Section: 7.5.5  [expr.prim.lambda]     Status: CD2     Submitter: Daveed Vandevoorde     Date: 5 February, 2009

[Voted into the WP at the July, 2009 meeting as part of N2927.]

The grammar in 7.5.5 [expr.prim.lambda] for lambda-parameter specifies that a declarator must be present, i.e., that all lambda-parameters must be named. This also has the effect of prohibiting a lambda like [](void){}. It is not clear that there is a good reason for these restrictions; programmers could reasonably expect that lambda-parameters were like ordinary function parameters in these regards.

Proposed resolution (July, 2009)

See document PL22.16/09-0117 = WG21 N2927.