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

2024-05-06


1034. Attributes for return statements in lambdas

Section: 7.5.5  [expr.prim.lambda]     Status: C++11     Submitter: Daveed Vandevoorde     Date: 2010-02-18

[Voted into the WP at the November, 2010 meeting.]

7.5.5 [expr.prim.lambda] bullet 4.1 says,

if the compound-statement if [sic] of the form

the type of the returned expression...

The problem (besides the typo “if”) is that the attribute-specifier for a return statement precedes, rather than following, the keyword (Clause 8 [stmt.stmt] paragraph 1).

Proposed resolution (September, 2010):

Change 7.5.5 [expr.prim.lambda] bullet 4.1 as follows: