In the below snippet, the second example call to max(2,3)
doesn't call the function. And there is no compile time/run time error.
Can somebody explain what's going on here?
template<class T1>
void max(int a,int b)
{
cout<<"max() called\n";
}
max<int>(2,3); //this calls max(2,3)
max(2,3); //surprisingly no error and max() isn't called here