:
template<int I, int J, class T> class X { };
template<int I, int J> class X<I, J, int> { }; template<int I> class X<I, I, int> { };
template<int I0, int J0> void f(X<I0, J0, int>); template<int I0> void f(X<I0, I0, int>);
template <auto v> class Y { };
template <auto* p> class Y<p> { }; template <auto** pp> class Y<pp> { };
template <auto* p0> void g(Y<p0>); template <auto** pp0> void g(Y<pp0>);
According to the ordering rules for function templates,
the function template
B
is more specialized than the function template
A
and
the function template
D
is more specialized than the function template
C. Therefore, the partial specialization #2
is more specialized than the partial specialization #1
and the partial specialization #4
is more specialized than the partial specialization #3
. —
end example