Skip to content

Commit b14fe45

Browse files
committed
avoid keyword name
1 parent 9d4fc0b commit b14fe45

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
@@ -7449,7 +7449,7 @@ If you can't name an enumeration, the values are not related
74497449

74507450
##### Example, bad
74517451

7452-
enum { red = 0xFF0000, scale = 4, signed = 1 };
7452+
enum { red = 0xFF0000, scale = 4, is_signed = 1 };
74537453

74547454
Such code is not uncommon in code written before there were convenient alternative ways of specifying integer constants.
74557455

@@ -7459,7 +7459,7 @@ Use `constexpr` values instead. For example:
74597459

74607460
constexpr int red = 0x,FF0000;
74617461
constexpr short scale = 4;
7462-
constexpr bool signed = true;
7462+
constexpr bool is_signed = true;
74637463

74647464
##### Enforcement
74657465

0 commit comments

Comments
 (0)