Annex G (informative) Ill-formed, no diagnostic required [ifndr]

G.10 [temp]: Templates [ifndr.temp]

G.10.14[ifndr:temp.deduct.general.diff.order]
Specified in: [temp.deduct.general]

If substitution into different declarations of the same function template would cause template instantiations to occur in a different order or not at all, the program is ill-formed, no diagnostic required.
[Example 1: template <class T> struct A { using X = typename T::X; }; template <class T> typename T::X h(typename A<T>::X); // #1 template <class T> auto h(typename A<T>::X) -> typename T::X; // redeclaration #2 template <class T> void h(...) { } void x() { h<int>(0); // Substituting into #1 forms an invalid type from T​::​X and does // not attempt to instantiate A. // Substituting into #2 instantiates A<T>, which is ill-formed. } — end example]