You have two template types: T
and G
. One list (T
) is for the class, and one (G
) is for the member function. Therefore, you have to have two lists; one for the class, then one for the function (and make sure that the right types go in the right places, T
after the class name and G
in the parameters):
template<typename T>
template<typename G>
inline G Vector2<T>::Dot(const Vector2<G>& U, const Vector2<G>& V)
{ return (U.x * V.x + U.y * V.y); }