From c680191bf96fb8f6bbbab4fccef6e0cfd78bd2eb Mon Sep 17 00:00:00 2001 From: psliwa Date: Wed, 24 Feb 2016 13:37:43 +0100 Subject: [PATCH] F.53: Fixed after review. --- CppCoreGuidelines.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 88beace..de099e9 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -3154,8 +3154,8 @@ Pointers and references to locals shouldn't outlive their scope. Lambdas that ca { int local = 42; thread_pool.queue_work([&]{ process(local); }); // Want a reference to local. - // Note, that after program exists this scope, - // local does no longer exist, therefore + // Note, that after program exits this scope, + // local no longer exists, therefore // process() call will have undefined behavior! } @@ -3170,8 +3170,8 @@ Pointers and references to locals shouldn't outlive their scope. Lambdas that ca ##### Enforcement -* **Easy:** Warn, when capture-list contains a reference to a locally declared variable -* **Medium:** Flag, when capture-list contains a reference to a locally declared variable and the lambda is passed to a non-`const` and non-local context +* (Simple) Warn when capture-list contains a reference to a locally declared variable +* (Complex) Flag when capture-list contains a reference to a locally declared variable and the lambda is passed to a non-`const` and non-local context ### F.54: If you capture `this`, capture all variables explicitly (no default capture)