aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lookup/member5.C
blob: fec1ecd5bfd49b8461e68479d83248f939d3abfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// PR c++/69753
// { dg-do compile { target c++11 } }

struct B {
  template <class> void bfn ();
};

template <class T>
constexpr int x(T) { return 42; }

template <int I>
struct C
{
  template <class> void cfn ();
};

template <typename T> struct A {
  static B fn(int);
  template <class U> static B ft(U);

  void g()
  {
    auto b = this->fn(42);
    b.bfn<int>();

    auto b2 = this->ft(42);
    b2.bfn<int>();

    auto c = C<x(42)>();
    c.cfn<int>();
  }
};