I tried this, but this gave me a
8: error: prototype for 'void s<T>::f()' does not match any in class 's<T>'
4: error: candidate is: template<class T> template<class U> void s::f()
That's why I asked.
Anyway, notice that template<class T, class U> applies both templates to the function
I don't understand what you say, you can use both templates in the function, although one of them has a bigger scope.