Details
Description
See https://google.github.io/styleguide/cppguide.html#Lambda_expressions
struct S { void member(Foo); void fun() { Foo foo; ... // if lambda is invoked after the function returns - both "foo" and the enclosing object could have been destroyed: executor->Schedule([&] { member(foo); }); } }
Attachments
Issue Links
- implements
-
RSPEC-3608 Default capture should not be used
- Active