summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/overload11.C
blob: 12b4978b94afc220dfa55559f556a60ded1e94f2 (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
// { dg-do link  }

template <class T>
int f(int (*fn)(T))
{
  return (*fn)(3);
}

struct S {
  static int g(int) { return 1; }
  static void g();

  int h();
};

int S::h()
{
  return f(&g);
}


int main()
{
  S s;
  if (s.h () != 1)
    return 1;
}