call r0 = Foo(c); // explicitly specify which function to call r1 = Foo<std::string>(c); r2 = Foo<std::string, char>(c); r3 = Foo<std::string, char>(&c); // generate output std::cout << r0 << " " << r1 << " " << r2 << " " << r3 << std::endl; return 0; } //expected output: Return1 Return2 Full PtrOverload References C++