// Verify we preserve the consistency of member function lookup outside of a // complete-class context. // { dg-do compile { target c++11 } } template struct A { template static void f(); // #1 template static auto g() -> decltype(f()); template static void f(...); // #2 }; int main() { A<>::g(); // OK, the later-declared #2 isn't considered when // instantiating f(), which would have otherwise // led to ambiguity. }