16
Library introduction
[library]
16.3
Method of description
[description]
16.3.3
Other conventions
[conventions]
16.3.3.3
Type descriptions
[type.descriptions]
16.3.3.3.3
Enumerated types
[enumerated.types]
1
#
Several types defined in
[input.
output]
are
enumerated types
.
Each enumerated type may be implemented as an enumeration or as a synonym for an enumeration
.
162
2
#
The enumerated type
enumerated
can be written:
enum
enumerated
{
V
0
,
V
1
,
V
2
,
V
3
,
…
}
;
inline
const
enumerated
C
0
(
V
0
)
;
inline
const
enumerated
C
1
(
V
1
)
;
inline
const
enumerated
C
2
(
V
2
)
;
inline
const
enumerated
C
3
(
V
3
)
; ⋮
3
#
Here, the names
C
0
,
C
1
, etc. represent
enumerated elements
for this particular enumerated type
.
All such elements have distinct values
.
162)
Such as an integer type, with constant integer values (
[basic.
fundamental]
)
.
тое