fork download
  1. #include <iostream>
  2.  
  3. void func(int a)
  4. {
  5. std::cout << a;
  6. }
  7.  
  8. struct evaluate{ template <typename... A> constexpr evaluate(A&&...) {} };
  9.  
  10. template <int... bla>
  11. void foo()
  12. {
  13. evaluate{(func(bla), 0)... };
  14. }
  15.  
  16.  
  17. int main()
  18. {
  19. foo<1, 2, 3>();
  20. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
321