Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- void foo(int i)
- {
- std::cout << i << std::endl;
- };
- template<typename... Types>
- void fold_f(Types... args)
- {
- (foo(args), ...);
- }
- int main()
- {
- fold_f(1, 2, 7);
- }
Advertisement
Add Comment
Please, Sign In to add comment