This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115a. See for the official list.


2644. Incorrect comment in example

Section:  [expr.prim.lambda.capture]     Status: C++23     Submitter: US     Date: 2022-11-03

P2720R0 comment US 13-042

[Accepted as a DR at the November, 2022 meeting.]

The comment in the example in [expr.prim.lambda.capture] paragraph 6 refers to "local variable", but should refer to init-capture instead.

Possible resolution:

Change in [expr.prim.lambda.capture] paragraph 6 as follows:

  auto z = [a = 42](int a) { return 1; };   // error: parameter and conceptual local variable have the same name