summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/template21.C
blob: 3bfd0cfc48137bdcf4d455f883b2a7dad97a947a (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
33
34
35
36
37
38
39
40
41
42
43
// { dg-do assemble  }
// GROUPS passed templates
template<class T>
class L {
public:
    L();

    T x[30];
    int doit(int i) const;
};

#ifdef BUG
template<class T>
int
L<T>::doit(int i) const
{
    return x[i].z;
}
#endif

class X {
public:
    class Y {
    public:
        Y();
        Y(int);

        int z;
    };
    
    L<Y> ly;
};

#ifndef BUG
template<class T>
int
L<T>::doit(int i) const
{
    return x[i].z;
}
#endif

static X x;