Title
Incorrect comment in example
Status
c++23
Section
7.5.5.3 [expr.prim.lambda.capture]
Submitter
US

Created on 2022-11-03.00:00:00 last changed 8 months ago

Messages

Date: 2022-11-27.21:00:25
P2720R0 comment USĀ 13-042

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

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

Possible resolution:

Change in 7.5.5.3 [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
History
Date User Action Args
2023-07-16 13:00:43adminsetstatus: open -> c++23
2023-07-16 13:00:43adminsetstatus: drwp -> open
2023-02-18 18:43:04adminsetstatus: dr -> drwp
2022-11-25 05:14:04adminsetstatus: nb -> dr
2022-11-08 07:09:46adminsetstatus: open -> nb
2022-11-08 07:09:46adminsetstatus: open -> open
2022-11-08 07:09:46adminsetstatus: open -> open
2022-11-08 07:09:46adminsetstatus: open -> open
2022-11-07 13:57:49adminsetstatus: nb -> open
2022-11-07 13:57:49adminsetstatus: nb -> nb
2022-11-07 13:57:49adminsetstatus: nb -> nb
2022-11-03 00:00:00admincreate