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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [forw_enum4.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-std=c++0x" }
3
 
4
template struct S1
5
{
6
    struct S2
7
    {
8
        // opaque enum declarations
9
        enum class E1;
10
        enum class E2 : T;
11
        enum class E3 : short;
12
        enum E4 : T;
13
        enum E5 : short;
14
 
15
        // can be repeated
16
        enum class E1;
17
        enum class E2 : T;
18
        enum class E3 : short;
19
        enum E4 : T;
20
        enum E5 : short;
21
    };
22
 
23
    // are complete so we can declare variables
24
    typename S2::E1 b1;
25
    typename S2::E2 b2;
26
    typename S2::E3 b3;
27
    typename S2::E4 b4;
28
    typename S2::E5 b5;
29
 
30
    //even with elaborated-type-specifiers
31
    enum S1::S2::E1 a1;
32
    enum S1::S2::E2 a2;
33
    enum S1::S2::E3 a3;
34
    enum S1::S2::E4 a4;
35
    enum S1::S2::E5 a5;
36
 
37
    // and the list can be added later
38
    enum class S1::S2::E1 { e11, e12 };
39
    enum class S1::S2::E2 : T { e21, e22 };
40
    enum class S1::S2::E3 : short {e31, e32 };
41
    enum S1::S2::E4 : T { e41, e42 };
42
    enum S1::S2::E5 : short { e51, e52 };
43
};
44
 
45
template struct S1;

powered by: WebSVN 2.1.0

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