OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [template/] [typedef27.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// Origin: PR c++/42713
2
// { dg-do compile }
3
 
4
template
5
struct S
6
{
7
};
8
 
9
template
10
struct S0
11
{
12
    typedef T TT;
13
};
14
 
15
template
16
struct super_struct : S0
17
{
18
    typedef S0 super;
19
};
20
 
21
template
22
struct S1 : super_struct
23
{
24
    typedef super_struct super;
25
    typedef typename super::super Super2;
26
    typedef typename Super2::TT Super2TT;
27
    void
28
    foo()
29
    {
30
        S s1;
31
    }
32
};
33
 
34
template
35
struct S2 : super_struct
36
{
37
    typedef super_struct super;
38
    typedef typename super::super Super2;
39
    typedef typename Super2::TT Super2TT;
40
    void
41
    foo()
42
    {
43
        S s1;
44
    }
45
};
46
 
47
int
48
main()
49
{
50
    S1, int> s1;
51
    s1.foo();
52
    S2 > s2;
53
    s2.foo();
54
}
55
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.