OSDN Git Service

2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / typedef17.C
1 // PR c++/37806
2
3 extern "C" int printf (const char *, ...);
4
5 template <typename T>
6 struct S1
7 {
8   typedef void (function_type)(int) const;
9 };
10
11
12 struct S2: public S1<int>
13 {
14   virtual function_type f = 0;
15 };
16
17 struct S3: public S2
18 {
19   void 
20   f (int i) const
21   {
22     printf ("Hello world: %d\n", i);
23   }
24 };
25
26
27 int
28 main()
29 {
30   S3 s;
31   s.f(5);
32 }