Converting the arguments of a captured parameter pack results in a compiler crash.
template
void bar(Args... args)
{
}
template
void foo(Args... args)
{
/*1*/ [&]() { bar((Args)args...); }; // compiler crash
/*2*/ [=]() { bar((Args)args...); }; // compiler crash
/*3*/ [args...]() { bar((Args)args...); }; // warning + error
/*4*/ [&]() { bar(args...); }; // ok
/*5*/ [=]() { bar(args...); }; // ok
/*6*/ [args...]() { bar(args...); }; // same as 3
/*7*...
Status: Active, 1 Up-Vote, 0 Down-Votes, 0 validations, 0 workarounds, 1 comment, feedback id: 3066731
Status: Active, 1 Up-Vote, 0 Down-Votes, 0 validations, 0 workarounds, 1 comment, feedback id: 3066731