#include #include using namespace std; template struct myclass { static void f(T t) {cout << "T\n";} }; template struct myclass { static void f(T *p) {cout << "T *\n";} }; template <> struct myclass { static void f(void *p) {cout << "void *\n";} }; template inline void f(T t) {myclass::f(t);} int main() { int i = 10; f(i); f(&i); f(static_cast(&i)); return EXIT_SUCCESS; }