20 Library introduction [library]

20.4 Method of description (Informative) [description]

20.4.2 Other conventions [conventions]

20.4.2.1 Type descriptions [type.descriptions]

20.4.2.1.3 Enumerated types [enumerated.types]

Several types defined in Clause [input.output] are enumerated types. Each enumerated type may be implemented as an enumeration or as a synonym for an enumeration.161

The enumerated type enumerated can be written:

enum enumerated { \textit{V}0, \textit{V}1, \textit{V}2, \textit{V}3, ..... };

inline const \textit{enumerated C}0(\textit{V}0);
inline const \textit{enumerated C}1(\textit{V}1);
inline const \textit{enumerated C}2(\textit{V}2);
inline const \textit{enumerated C}3(\textit{V}3);
  .....

Here, the names \textit{C}0, \textit{C}1, etc. represent enumerated elements for this particular enumerated type. All such elements have distinct values.

Such as an integer type, with constant integer values ([basic.fundamental]).