Created on 2015-05-06.00:00:00 last changed 28 months ago
Notes from the October, 2015 meeting:
Additional wording is needed in the proposed resolution in paragraph 5 to handle the potential absence of the parameter declaration clause.
Proposed resolution (May, 2015):
Change the grammar in 7.5.6 [expr.prim.lambda] paragraph 1 as follows:
...
lambda-declarator:Change 7.5.6 [expr.prim.lambda] paragraph 4 as follows:
If a lambda-expression does not include a lambda-declarator, it is as if the lambda-declarator were ().The lambda return type...
Change 7.5.6 [expr.prim.lambda] paragraph 5 as follows:
The closure type for a non-generic lambda-expression has a public inline function call operator (12.4.4 [over.call]) whose parameters and return type are described by the lambda-expression's parameter-declaration-clause and trailing-return-type respectively. For a generic lambda... This function call operator or operator template is declared const (11.4.3 [class.mfct.non.static]) if and only if thelambda-expression's parameter-declaration-clause is not followed bylambda-declarator does not contain the keyword mutable. It is neither...
[Adopted at the February, 2021 meeting as paper P1102R2.]
The grammar in 7.5.6 [expr.prim.lambda] paragraph 1 allows for omitting the the parameter list but only for a non-mutable lambda, i.e., it does not permit
auto lambda = [] mutable { };
This should be addressed, and the possibility of other abbreviated forms should be considered, such as:
[] -> float { return 42; } [] noexcept { foo(); }
(This is EWG issue 135.)
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-08-19 07:54:33 | admin | set | status: wp -> cd6 |
2021-11-15 00:00:00 | admin | set | status: accepted -> wp |
2021-02-17 00:00:00 | admin | set | status: drafting -> accepted |
2015-11-10 00:00:00 | admin | set | messages: + msg5642 |
2015-11-10 00:00:00 | admin | set | status: review -> drafting |
2015-05-25 00:00:00 | admin | set | messages: + msg5473 |
2015-05-06 00:00:00 | admin | create |