#include <functional>
template <class T, class... A>
void foo(T&& func, A&&... args) {
std::function<void()> task([func, args...] () {
//...
});
}
int main()
{
}
ICAgICNpbmNsdWRlIDxmdW5jdGlvbmFsPgoKICAgIHRlbXBsYXRlIDxjbGFzcyBULCBjbGFzcy4uLiBBPgogICAgdm9pZCBmb28oVCYmIGZ1bmMsIEEmJi4uLiBhcmdzKSB7CiAgICAgICAgc3RkOjpmdW5jdGlvbjx2b2lkKCk+IHRhc2soW2Z1bmMsIGFyZ3MuLi5dICgpIHsKICAgICAgICAgICAgLy8uLi4KICAgICAgICB9KTsKICAgIH0KCiAgICBpbnQgbWFpbigpCiAgICB7CgogICAgfQo=
prog.cpp: In function ‘void foo(T&&, A&& ...)’:
prog.cpp:5:47: error: expected ‘,’ before ‘...’ token
prog.cpp:5:47: error: expected identifier before ‘...’ token
prog.cpp:5:50: error: parameter packs not expanded with ‘...’:
prog.cpp:5:50: note: ‘args’