fork download
  1. #include <iostream>
  2.  
  3. template<typename F, typename T>
  4. void
  5. apply(F f, T t){
  6. f(t);
  7. }
  8.  
  9. template<typename T>
  10. void
  11. print(T t){
  12. std::cout << t << std::endl;
  13. }
  14.  
  15.  
  16. int
  17. main(){
  18. apply(print, 10);
  19. return 0;
  20. }
  21.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty