From 5bea791695a805b3e6823dede1afa32b25917997 Mon Sep 17 00:00:00 2001 From: kimim Date: Sat, 2 Sep 2023 09:29:25 +0800 Subject: [PATCH 1/2] fix NL.9 ALL_CAPS does not apply to non-macro symbolic constants --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index d6b82c529..1d42e084a 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -21643,7 +21643,7 @@ To avoid confusing macros with names that obey scope and type rules. ##### Note -This rule applies to non-macro symbolic constants: +This rule does not apply to non-macro symbolic constants (see also [Enum.5: Don't use `ALL_CAPS` for enumerators](#Renum-caps)): enum bad { BAD, WORSE, HORRIBLE }; // BAD From 175a7208c4ba3e7f78646d41d78b5b7b9f8c0fdf Mon Sep 17 00:00:00 2001 From: Kimi MA Date: Sat, 23 Sep 2023 10:30:18 +0800 Subject: [PATCH 2/2] Update CppCoreGuidelines.md fix according to comment --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 1d42e084a..134749aaf 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -21643,7 +21643,7 @@ To avoid confusing macros with names that obey scope and type rules. ##### Note -This rule does not apply to non-macro symbolic constants (see also [Enum.5: Don't use `ALL_CAPS` for enumerators](#Renum-caps)): +In particular, this avoids confusing macros with non-macro symbolic constants (see also [Enum.5: Don't use `ALL_CAPS` for enumerators](#Renum-caps)) enum bad { BAD, WORSE, HORRIBLE }; // BAD