Skip to content

Commit

Permalink
Removed confusing comments (#2076) (#2179)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauljansen42 authored Apr 11, 2024
1 parent c91ea43 commit d76efeb
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions CppCoreGuidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d76efeb

Please sign in to comment.