The compiler doesn't know what type to use for tt1 and tt2 for instanciation therefore the message.
template <class tt1, class tt2> double the_sum(tt1& a,tt2& b)
{
return (double)(a.el+b.el);
}
In this case the compiler can instanciate the template function for the types
calc<int>
and
calc<double>
implicit.
This maybe look better, regards.