Guest User

Untitled

a guest
Nov 28th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. void foo(int i)
  4. {
  5.   std::cout << i << std::endl;
  6. };
  7.  
  8. template<typename... Types>
  9. void fold_f(Types... args)
  10. {
  11.   (foo(args), ...);
  12. }
  13.  
  14. int main()
  15. {
  16.   fold_f(1, 2, 7);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment