This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115f. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-12-06
[Voted into WP at March, 2010 meeting.]
The following is not allowed by the current syntax of lambda-capture but would be useful:
template <typename ...Args> void f(Args... args) { auto l = [&, args...] { return g(args...); }; }
Proposed resolution (October, 2009):
Change the grammar in 7.5.6 [expr.prim.lambda] paragraph 1 as follows:
Add a new paragraph at the end of 7.5.6 [expr.prim.lambda]:
A capture followed by an ellipsis is a pack expansion (13.7.4 [temp.variadic]). [Example:
template<typename ...Args> void f(Args... args) { auto l = [&, args...] { return g(args...); }; l(); }—end example]
Add a new bullet to the list in 13.7.4 [temp.variadic] paragraph 4:
[Editorial note: the editor may wish to consider sorting the bullets in this list in order of section reference.]