fork(3) download
  1. #include <functional>
  2.  
  3. template <class T, class... A>
  4. void foo(T&& func, A&&... args) {
  5. std::function<void()> task([func, args...] () {
  6. //...
  7. });
  8. }
  9.  
  10. int main()
  11. {
  12.  
  13. }
  14.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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’
stdout
Standard output is empty