// PR c++/98687 // { dg-do compile } struct S { }; namespace N { template bool operator==(T, int); template void X(T); } namespace M { template bool operator==(T, double); } template bool fn1 (T t) { using N::operator==; return t == 1; } template bool fn2 (T t) { // Redeclaration. using N::operator==; using N::operator==; return t == 1; } template bool fn3 (T t) { // Need update_local_overload. using N::operator==; using M::operator==; return t == 1; } template void fn4 (T) { struct X { }; using N::X; X(1); } template void fn5 (T) { int S; using ::S; struct S s; } void g () { S s; fn1 (s); fn2 (s); fn3 (s); fn4 (s); fn5 (s); }