#include<bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
inline T1 max (T1 const& a, T2 const& b)
{
return a < b ? b : a;
}
template <>
inline int max<int,int> (const int& a, const int& b)
{
return 10;
}
int main() {
cout << max(4,4.2) << endl;
cout << max(5,5) << endl;
return 0;
}
The output for the above code is 4 5
and not 4 10
, please explain why.