Created on2008-12-11.00:00:00 last changed145 months ago
Rationale, March, 2009:
This idea was discussed and rejected by the EWG.
This issue was addressed by the adoption of N3648, adopted at theApril, 2013 (Bristol) meeting.
In the current specification of lambda expressions, a name appearingin alambda-capture must refer to a local variable or referencewith automatic storage duration (7.5.6 [expr.prim.lambda] paragraph3). This restriction seems unnecessary and possibly confusing.
One possibility would be to extend the syntax of thelambda-capture to be something like
v =expr
with the meaning that the closure object would have a membernamedv initialized with the valueexpr. With thisextension, the current syntax could be viewed as an abbreviationfor
v = v
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2014-03-03 00:00:00 | admin | set | status: extension -> cd3 |
| 2009-03-23 00:00:00 | admin | set | messages: +msg2035 |
| 2009-03-23 00:00:00 | admin | set | status: open -> extension |
| 2008-12-11 00:00:00 | admin | create | |