From d35d76c3e3ba2434fc3534d52e008f9051a5fcb5 Mon Sep 17 00:00:00 2001 From: Sergey Zubkov Date: Tue, 23 Jul 2019 09:10:19 -0400 Subject: [PATCH] closes #1479 --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 9ede40f..93fdcfc 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -3744,7 +3744,7 @@ This should be enforced by tooling by checking the return expression . ##### Reason -Functions can't capture local variables or be declared at local scope; if you need those things, prefer a lambda where possible, and a handwritten function object where not. On the other hand, lambdas and function objects don't overload; if you need to overload, prefer a function (the workarounds to make lambdas overload are ornate). If either will work, prefer writing a function; use the simplest tool necessary. +Functions can't capture local variables or be defined at local scope; if you need those things, prefer a lambda where possible, and a handwritten function object where not. On the other hand, lambdas and function objects don't overload; if you need to overload, prefer a function (the workarounds to make lambdas overload are ornate). If either will work, prefer writing a function; use the simplest tool necessary. ##### Example