fork(67) download
  1. #include <iostream>
  2.  
  3. template <typename T>
  4. void bar(T t) { std::cout << t << '\n'; }
  5.  
  6. void foo2() {}
  7.  
  8. template <typename Car, typename... Cdr>
  9. void foo2(Car car, Cdr... cdr)
  10. {
  11. bar(car);
  12. foo2(cdr...);
  13. }
  14.  
  15. int main()
  16. {
  17. foo2 (1, 2, 3, "3");
  18. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
1
2
3
3