提交 e5839299 编写于 作者: H Herb Sutter

Updated Con.1 to make one function a definition, closes #1785

Also fixed "arguments" -> "parameters"
上级 bfa349b6
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册