Comment by roca
7 years ago
Lambda captures make it pretty easy to create nasty memory safety issues via dangling references. Sure, you could create such issues with the equivalent manually written closure-structs, but lambda captures pave the dangerous path.
But cppcheck can find a lot of dangling references with lambda captures.