When a member function, a member class, a member enumeration, a static data member or
a member template of a class
template is defined outside of the class template definition,
the member definition is defined as a template definition in which the
template-head is equivalent to that
of the class template (
[temp.over.link])
. The names of the template parameters used in the definition of the member may
be different from the template parameter names used in the class
template definition
. The template argument list following the class template name in the member
definition shall name the parameters in the same order as the one used in
the template parameter list of the member
. Each template
parameter pack shall be expanded with an ellipsis in the template
argument list
. [
Example 2:
template<class T1, class T2> struct A {
void f1();
void f2();
};
template<class T2, class T1> void A<T2,T1>::f1() { }
template<class T2, class T1> void A<T1,T2>::f2() { }
template<class ... Types> struct B {
void f3();
void f4();
};
template<class ... Types> void B<Types ...>::f3() { }
template<class ... Types> void B<Types>::f4() { }
template<typename T> concept C = true;
template<typename T> concept D = true;
template<C T> struct S {
void f();
void g();
void h();
template<D U> struct Inner;
};
template<C A> void S<A>::f() { }
template<typename T> void S<T>::g() { }
template<typename T> requires C<T>
void S<T>::h() { }
template<C X> template<D Y>
struct S<X>::Inner { };
— end example]