fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. template <typename T>
  6. void bottom(T x) {cout << x << " ";}
  7.  
  8. void recurse(){} // <== MOVE THIS BEFORE THE POINT WHERE IT IS CALLED
  9.  
  10. template <typename Head, typename... Tail>
  11. void recurse(Head h, Tail... t)
  12. {
  13. bottom(h);
  14. recurse(t...);
  15. }
  16.  
  17. int main() { recurse(1,2.2,4); }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
1 2.2 4