Removed confusing comments (#2076) (#2179)

pull/2194/head
Paul Jansen 2 years ago committed by GitHub
parent c91ea43aba
commit d76efeb645
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -4151,8 +4151,6 @@ It's confusing. Writing `[=]` in a member function appears to capture by value,
// ...
auto lambda = [=] { use(i, x); }; // BAD: "looks like" copy/value capture
// [&] has identical semantics and copies the this pointer under the current rules
// [=,this] and [&,this] are not much better, and confusing
x = 42;
lambda(); // calls use(0, 42);

Loading…
Cancel
Save