Template function inside template class
Write this: template <class T> template <class U> void MyClass<T>::foo() { /* … */ }
Write this: template <class T> template <class U> void MyClass<T>::foo() { /* … */ }
CTAD (Class Template Argument Deduction) is an all or nothing process currently. You either specify nothing and allow the compiler to deduce all of the arguments, or you specify all of the arguments taking the compiler out of the loop. There is a paper (P1021R0) which asks for this and more, but it has not … Read more