Possible Duplicate:
Program to implement the is_same_type type trait in c++
I want my template function to do something differently based on whether the two typenames are equal or not:
template <typename T1, typename T2> f()
{
if (T1==T2) ...;
else ...;
}
I know "if(T1==T2)" is not gonna working, but, is there a way to do it?