OSDN Git Service

Initial revision
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.brendan / template21.C
1 // Build don't link: 
2 // GROUPS passed templates
3 template<class T>
4 class L {
5 public:
6     L();
7
8     T x[30];
9     int doit(int i) const;
10 };
11
12 #ifdef BUG
13 template<class T>
14 int
15 L<T>::doit(int i) const
16 {
17     return x[i].z;
18 }
19 #endif
20
21 class X {
22 public:
23     class Y {
24     public:
25         Y();
26         Y(int);
27
28         int z;
29     };
30     
31     L<Y> ly;
32 };
33
34 #ifndef BUG
35 template<class T>
36 int
37 L<T>::doit(int i) const
38 {
39     return x[i].z;
40 }
41 #endif
42
43 static X x;