2 // { dg-do compile { target c++11 } }
3 // Two dependent names are equivalent even if the overload sets found by
4 // phase 1 lookup are different. Merging them keeps the earlier set.
7 template <class T> decltype(g1(T())) f1();
9 template <class T> decltype(g1(T())) f1()
11 int i1 = f1<int>(); // OK, g1(int) was declared before the first f1
13 template <class T> decltype(g2(T())) f2(); // { dg-error "g2. was not declared" }
15 template <class T> decltype(g2(T())) f2()
17 int i2 = f2<int>(); // { dg-error "no match" }
20 template <class T> decltype(g3(T())) f3(); // { dg-error "too many arguments" }
22 template <class T> decltype(g3(T())) f3()
24 int i3 = f3<int>(); // { dg-error "no match" }