fork download
  1. #include <iostream>
  2. using namespace std;
  3. template <typename T>
  4. void f(T & t)
  5. {
  6. cout << __PRETTY_FUNCTION__ << endl;
  7. }
  8. void f(const string &)
  9. {
  10. cout << __PRETTY_FUNCTION__ << endl;
  11. }
  12. void f(int)
  13. {
  14. cout << __PRETTY_FUNCTION__ << endl;
  15. }
  16. int main()
  17. {
  18. f(1.0);
  19. f(1);
  20. f(string("sss"));
  21. string a;
  22. f(a);
  23. }
  24.  
Success #stdin #stdout 0.02s 2856KB
stdin
Standard input is empty
stdout
void f(int)
void f(int)
void f(const std::string&)
void f(T&) [with T = std::string]