Template function inside template class

Write this:

template <class T>
template <class U>
void MyClass<T>::foo() { /* ... */ }

Leave a Comment