Skip to content

Commit 9160dbb

Browse files
committed
invalid enums
1 parent b14fe45 commit 9160dbb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CppCoreGuidelines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7512,8 +7512,8 @@ The default gives a consecutive set of values that is good for `switch`-statemen
75127512
##### Example
75137513

75147514
enum class Col1 { red, yellow, blue };
7515-
enum class Col2 { red = 1, red = 2, blue = 2 }; // typo
7516-
enum class Month { jan = 1, feb, mar, apr, mar, jun,
7515+
enum class Col2 { red = 1, yellow = 2, blue = 2 }; // typo
7516+
enum class Month { jan = 1, feb, mar, apr, may, jun,
75177517
jul, august, sep, oct, nov, dec }; // starting with 1 is conventional
75187518
enum class Base_flag { dec = 1, oct = dec << 1, hex = dec << 2 }; // set of bits
75197519

0 commit comments

Comments
 (0)