Created on 2016-08-14.00:00:00 last changed 83 months ago
Rationale (July, 2017):
This issue is a duplicate of issue 2308.
Consider:
void f() { tuple<int, int> a; auto &[x, y] = a; [x] {}; // ok, captures reference to int member of 'a' by value [&] { use(x); }; // ok, capture reference by reference } void g() { struct T { int a, b; } a; auto &[x, y] = a; [x] {}; // ill-formed, 'x' does not name a variable [&] { use(x); }; // ??? }
The standard is silent on whether and how identifiers of a decomposition declaration can be captured by a lambda.
History | |||
---|---|---|---|
Date | User | Action | Args |
2018-02-27 00:00:00 | admin | set | messages: + msg6025 |
2016-08-14 00:00:00 | admin | create |