fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template<typename T>
  5. void f(const T& t)
  6. {
  7. cout << "In template function." << endl;
  8. }
  9.  
  10. class C
  11. {
  12. public:
  13. void f() { cout << "In class function." << endl; }
  14. void g() { using ::f; int i=0; f(i); }
  15. };
  16.  
  17. int main()
  18. {
  19. cout << "Test" << endl;
  20. C c;
  21. c.g();
  22. return 0;
  23. }
  24.  
Success #stdin #stdout 0s 2724KB
stdin
Standard input is empty
stdout
Test
In template function.