re PR c++/84691 (internal compiler error: in poplevel_class, at cp/name-lookup.c...
[official-gcc.git] / gcc / testsuite / g++.dg / lookup / member5.C
blobfec1ecd5bfd49b8461e68479d83248f939d3abfb
1 // PR c++/69753
2 // { dg-do compile { target c++11 } }
4 struct B {
5   template <class> void bfn ();
6 };
8 template <class T>
9 constexpr int x(T) { return 42; }
11 template <int I>
12 struct C
14   template <class> void cfn ();
17 template <typename T> struct A {
18   static B fn(int);
19   template <class U> static B ft(U);
21   void g()
22   {
23     auto b = this->fn(42);
24     b.bfn<int>();
26     auto b2 = this->ft(42);
27     b2.bfn<int>();
29     auto c = C<x(42)>();
30     c.cfn<int>();
31   }