OSDN Git Service

* gcc.dg/20020201-1.c: Use cleanup-coverage_files.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / ttp35.C
1 // { dg-do run  }
2 template<int T, class U = int> class D
3 {
4         public:
5                 int f();
6 };
7
8 template<int T, class U> int D<T,U>::f()
9 {
10         return T+sizeof(U);
11 }
12
13 template<template<int> class D,class E> class C
14 {
15                 D<1> d;
16         public:
17                 int f() { return d.f(); }
18 };
19
20 template<template<int> class D> int f(D<2> &d1)
21 {
22         d1.f();
23         return 0;
24 }
25
26 template<template<int> class D> int f(D<1> &d1)
27 {
28         d1.f();
29         return 0;
30 }
31
32 int main()
33 {
34         D<1> c1;
35         f(c1);
36 }