From af18193511663c589788614f9f43cf302f56f65a Mon Sep 17 00:00:00 2001 From: RicoAntonioFelix Date: Thu, 1 Oct 2015 21:32:09 -0400 Subject: [PATCH] Added capture in lambda expression... --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 558abbc..0eba668 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -9325,7 +9325,7 @@ Let cleanup actions on the unwinding path be handled by [RAII](#Re-raii). void f(int n) { void* p = malloc(1, n); - auto _ = finally([] { free(p); }); + auto _ = finally([p] { free(p); }); // ... }