aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/template21.C
blob: 9d6139191e0cbadb56afaf9cdb10a876e2839e57 (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
// Build don't link: 
// 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;