I try to figure out what is difference between this to function.
First one is template function for adding to expression :
template <class T,class Y,class Z>
Z add(T t,Y y)
{
return t+y;
}
Specialization_1 :
template<>
int add<int,int,int>(int t,int y)
{
return t+y+10000;
}
Specialization_2 :
int add(int t,int y)
{
return t+y+10000;
}
What difference is between speciaization_1 and specialization_2 ? Is it necessary to use template<> before declaration????