From 1a3de0e9b80d700a06c458aeb707ae0a0006c0cb Mon Sep 17 00:00:00 2001 From: Bjarne Stroustrup Date: Sun, 17 Sep 2017 18:13:16 -0400 Subject: [PATCH] add a cross reference to P.3 --- CppCoreGuidelines.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index e1eab29..636905e 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -594,6 +594,7 @@ Now, there is no explicit mention of the iteration mechanism, and the loop opera for (auto& x : v) { /* modify x */ } +For more details about for-statements, see [ES.71](#Res-for-range). Sometimes better still, use a named algorithm: for_each(v, [](int x) { /* do something with the value of x */ });