From e5839299964d9ceacc84cb595692b72c89c21e73 Mon Sep 17 00:00:00 2001 From: Herb Sutter Date: Thu, 13 May 2021 11:48:20 -0700 Subject: [PATCH] Updated Con.1 to make one function a definition, closes #1785 Also fixed "arguments" -> "parameters" --- CppCoreGuidelines.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 1e22656..9a870eb 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -16540,13 +16540,13 @@ Prevents accidental or hard-to-notice change of value. ##### Exception -Function arguments are rarely mutated, but also rarely declared const. -To avoid confusion and lots of false positives, don't enforce this rule for function arguments. +Function parameters passed by value are rarely mutated, but also rarely declared `const`. +To avoid confusion and lots of false positives, don't enforce this rule for function parameters. void f(const char* const p); // pedantic - void g(const int i); // pedantic + void g(const int i) { ... } // pedantic -Note that function parameter is a local variable so changes to it are local. +Note that a function parameter is a local variable so changes to it are local. ##### Enforcement