|
|
|
|
@ -7512,8 +7512,8 @@ The default gives a consecutive set of values that is good for `switch`-statemen
|
|
|
|
|
##### Example
|
|
|
|
|
|
|
|
|
|
enum class Col1 { red, yellow, blue };
|
|
|
|
|
enum class Col2 { red = 1, red = 2, blue = 2 }; // typo
|
|
|
|
|
enum class Month { jan = 1, feb, mar, apr, mar, jun,
|
|
|
|
|
enum class Col2 { red = 1, yellow = 2, blue = 2 }; // typo
|
|
|
|
|
enum class Month { jan = 1, feb, mar, apr, may, jun,
|
|
|
|
|
jul, august, sep, oct, nov, dec }; // starting with 1 is conventional
|
|
|
|
|
enum class Base_flag { dec = 1, oct = dec << 1, hex = dec << 2 }; // set of bits
|
|
|
|
|
|
|
|
|
|
|