fork download
  1. #include <iostream>
  2.  
  3. template<class T>
  4. void foo(T&&) {std::cout << "Ich bin das Funktionstemplate!\n";}
  5.  
  6. void foo(const int&) {std::cout << "Ich bin das zweite foo\n";}
  7.  
  8. int main()
  9. {
  10. int i = 23;
  11. foo(i);
  12. }
  13.  
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
Ich bin das Funktionstemplate!