26
Does anyone know if the following implicit capture of 'ts' is well-formed:
template<class ... Ts> void bar(Ts ... ts) { }
template<class ... Ts> int foo(Ts ... ts) {
auto L = [=] () {
bar(ts...);
};
L();
return 0;
}
int g = foo(1, 2, 3);
Does the standard clearly state anywhere that this should not be well formed?