3.4 [basic.lookup]/p1
Overload resolution (13.3) takes place after name lookup has succeeded.
void g(long);
void g(int, int);
template<class T> void f() { g(0); }
void g(int, int = 0) {}
int main(){
f<int>();
}
gcc compiles succeed, clang faild.
When does overload resolution of non-dependent name take place, in definition context or point of instantiation? Or both are right?