aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/typedef17.C
blob: 263e28886f990a2b6f3d688feb35f1df6cdb6470 (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++/37806

extern "C" int printf (const char *, ...);

template <typename T>
struct S1
{
  typedef void (function_type)(int) const;
};


struct S2: public S1<int>
{
  virtual function_type f = 0;
};

struct S3: public S2
{
  void 
  f (int i) const
  {
    printf ("Hello world: %d\n", i);
  }
};


int
main()
{
  S3 s;
  s.f(5);
}