Created on 2008-12-11.00:00:00 last changed 129 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 the April, 2013 (Bristol) meeting.
In the current specification of lambda expressions, a name appearing in a lambda-capture must refer to a local variable or reference with automatic storage duration (7.5.6 [expr.prim.lambda] paragraph 3). This restriction seems unnecessary and possibly confusing.
One possibility would be to extend the syntax of the lambda-capture to be something like
v = expr
with the meaning that the closure object would have a member named v initialized with the value expr. With this extension, the current syntax could be viewed as an abbreviation for
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 |