enumeration declaration

enumeration declaration

An enumeration is a distinct type whose value is restricted to a range of values (see below for details), which may include several explicitly named constants ("enumerators"). The values of the constants are values of an integral type known as the underlying type of the enumeration.

An enumeration is defined by enum-specifier, which appears in decl-specifier-seq of the declaration syntax. The enum-specifier has the following syntax:

enum-key attr(optional) identifier(optional) enum-base(optional)登录查看完整内容