fork(4) download
  1. #include <iostream>
  2.  
  3. template<typename...> void f();
  4.  
  5. template<>
  6. void f() {}
  7.  
  8. template<int H, int... T>
  9. void f()
  10. {
  11. f<T...>();
  12. std::cout << H << std::endl;
  13. }
  14.  
  15. int main()
  16. {
  17. f<1,2,3,42,5>();
  18.  
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 4956KB
stdin
Standard input is empty
stdout
5
42
3
2
1