Possible Duplicate:
Where and why do I have to put “template” and “typename” on dependent names?
I have following constellation:
template<typename T>
class A{
template<typename U>
A<U> f()const;
}
template<typename T, typename U>
A<U> F(const A<T> &I)
{
return I.f<U>();//this does not work
}
The compiler error on the marked line is:
error: expected initializer before ‘>’ token
So how do I write the line correctly?