mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 20:54:41 +03:00
Added capture in lambda expression...
This commit is contained in:
@@ -9325,7 +9325,7 @@ Let cleanup actions on the unwinding path be handled by [RAII](#Re-raii).
|
|||||||
void f(int n)
|
void f(int n)
|
||||||
{
|
{
|
||||||
void* p = malloc(1, n);
|
void* p = malloc(1, n);
|
||||||
auto _ = finally([] { free(p); });
|
auto _ = finally([p] { free(p); });
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user