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

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

G.10.10[ifndr:temp.dep.candidate.different.lookup.different]
Specified in: [temp.dep.candidate]

If considering all function declarations with external linkage in the associated namespaces in all translations would make a dependent call ([temp.dep]) ill-formed or find a better match, the program is ill-formed, no diagnostic required.
[Example 1: 

Translation unit #1:namespace A { struct S {}; void f(S&, long x, int y); // #3 void g(S&, int x); // #4 }

Translation unit #2:namespace A { struct S {}; void f(S&, int x, long y); // #5 void g(S&, long x); // #6 } template <typename T> void h(T& t) { f(t, 1, 1); // Selects #5 in h<A​::​S>, would be ambiguous call if all declarations were considered. g(t, 1); // Selects #6 in h<A​::​S>, would select #4 if all declarations were considered. } — end example]