This does the trick:
template
class List
{
public:
template
void insert(const C & x)
{
// call when Object is MyClass
std::cout << "1" << "\n" ;
}
template
void insert(P* p)
{
// call when Object is MyClass*
std::cout << "2" << "\n" ;
}
} ;
Here is a working example.