Skip to content

Commit 9a4db6c

Browse files
committed
Adopt the change suggested in PR #1556, just making the casing consistent the other way (lowercase)
1 parent b01d9e0 commit 9a4db6c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CppCoreGuidelines.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8809,13 +8809,13 @@ To minimize surprises: traditional enums convert to int too readily.
88098809
void Print_color(int color);
88108810

88118811
enum Web_color { red = 0xFF0000, green = 0x00FF00, blue = 0x0000FF };
8812-
enum Product_info { Red = 0, Purple = 1, Blue = 2 };
8812+
enum Product_info { red = 0, purple = 1, blue = 2 };
88138813

88148814
Web_color webby = Web_color::blue;
88158815

88168816
// Clearly at least one of these calls is buggy.
88178817
Print_color(webby);
8818-
Print_color(Product_info::Blue);
8818+
Print_color(Product_info::blue);
88198819

88208820
Instead use an `enum class`:
88218821

@@ -8826,7 +8826,7 @@ Instead use an `enum class`:
88268826

88278827
Web_color webby = Web_color::blue;
88288828
Print_color(webby); // Error: cannot convert Web_color to int.
8829-
Print_color(Product_info::Red); // Error: cannot convert Product_info to int.
8829+
Print_color(Product_info::red); // Error: cannot convert Product_info to int.
88308830

88318831
##### Enforcement
88328832

0 commit comments

Comments
 (0)