~ubuntu-branches/ubuntu/trusty/c++-annotations/trusty

« back to all changes in this revision

Viewing changes to yo/first/stronglytyped.yo

  • Committer: Package Import Robot
  • Author(s): Frank B. Brokken
  • Date: 2012-01-20 11:53:17 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20120120115317-v4wiq9sttx72fabk
Tags: 9.1.0-1
New upstream release (covering C++11 to a large extend)

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
enumeration is defined. As a consequence, two enumerations having the same
8
8
scope cannot have identical values.
9
9
 
10
 
In the C++0x standard these problems are solved by defining
 
10
In the C++11 standard these problems are solved by defining
11
11
    em(enum classes). An emi(enum class) can be defined as in the following
12
12
example:
13
13
        verb(
36
36
    E.g.,
37
37
        verb(
38
38
    enum Enum1;                 // Illegal: no size available
39
 
    enum Enum2: unsigned int;   // Legal in C++0x: explicitly declared type
 
39
    enum Enum2: unsigned int;   // Legal in C++11: explicitly declared type
40
40
 
41
 
    enum class Enum3;           // Legal in C++0x: default int type is used
42
 
    enum class Enum4: char;     // Legal in C++0x: explicitly declared type
 
41
    enum class Enum3;           // Legal in C++11: default int type is used
 
42
    enum class Enum4: char;     // Legal in C++11: explicitly declared type
43
43
        )