Can class member functions be template functions, or must they be static class functions. Basically can the class and the function be technically instantiated separately on demand?
What are the limitations of using a template function as a member of a template class? Can both be done at the same time at all, or is it either or?
You can have template member functions of template classes, like this:
template <typename T>
class Foo {
public:
template <typename U>
void bar(const T& t, const U& u);
};
template <typename T>
template <typename U>
void Foo<T>::bar(const T& t, const U& u) {
// ...
}