Guest User

Untitled

a guest
Jun 21st, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. void bar(int t) {
  5. printf("%d\n", t);
  6. }
  7. void bar(double t) {
  8. printf("%f\n", t);
  9. }
  10.  
  11. template<typename... Args>
  12. void foo(Args &&... args){
  13. int dummy[] = {0, ((void)bar(args), 0) ...};
  14. }
  15.  
  16. int main(){
  17. foo(1, 2.0, 3.0, 4);
  18.  
  19. system("pause");
  20. return 0;
  21. }
Add Comment
Please, Sign In to add comment