From 6e39add6a60be2ad4ff978669de76a36deda4ea3 Mon Sep 17 00:00:00 2001 From: Michael Park Date: Thu, 10 Dec 2015 07:45:42 -0500 Subject: [PATCH] P.3: Fixed an inaccurate description of `for (const auto& x : v)`. --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index fbbd9f5..51d0cd7 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -464,7 +464,7 @@ Better: for (const auto& x : v) { /* do something with x */ } -Now, there is no explicit mention of the iteration mechanism, and the loop operates on a copy of elements so that accidental modification cannot happen. If modification is desired, say so: +Now, there is no explicit mention of the iteration mechanism, and the loop operates on a reference to `const` elements so that accidental modification cannot happen. If modification is desired, say so: for (auto& x : v) { /* do something with x */ }