umbrello
2.32.0
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
test
import
cxx
cxx11-strongly-typed-enumerations.h
Go to the documentation of this file.
1
// https://en.wikipedia.org/wiki/C%2B%2B11#Strongly_typed_enumerations
2
3
// #1
4
enum class
Enumeration
{
5
Val1
,
6
Val2
,
7
Val3 = 100,
8
Val4
// = 101
9
};
10
11
// #2
12
enum class
Enum2
: unsigned
int
{
Val1
,
Val2
};
13
14
// #3
15
enum
Enum3
:
unsigned
long
{
Val1
= 1,
Val2
};
16
17
// #4
18
//enum Enum1; // Illegal in C++03 and C++11; the underlying type cannot be determined.
19
enum
Enum2
:
unsigned
int
;
// Legal in C++11, the underlying type is explicitly specified.
20
enum class
Enum3
;
// Legal in C++11, the underlying type is int.
21
enum class
Enum4 : unsigned
int
;
// Legal in C++11.
22
//enum Enum2 : unsigned short; // Illegal in C++11, because Enum2 was previously declared with a different underlying type.
Val1
@ Val1
Definition:
cxx11-strongly-typed-enumerations.h:15
Enumeration
Enumeration
Definition:
cxx11-strongly-typed-enumerations.h:4
Val2
@ Val2
Definition:
cxx11-strongly-typed-enumerations.h:15
Enum2
Enum2
Definition:
cxx11-strongly-typed-enumerations.h:12
int
int int y int
Definition:
cxx11-lambda-functions-and-expressions.h:4
Enumeration::Val1
@ Val1
Enum3
Enum3
Definition:
cxx11-strongly-typed-enumerations.h:15
Generated by
1.8.20