Skip to content

Commit

Permalink
Fix incorrect lambda expression capture of [this].
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyCalandra committed Jun 27, 2020
1 parent 58b2147 commit aff25ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CPP11.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ A `lambda` is an unnamed function object capable of capturing variables in scope
* `[]` - captures nothing.
* `[=]` - capture local objects (local variables, parameters) in scope by value.
* `[&]` - capture local objects (local variables, parameters) in scope by reference.
* `[this]` - capture `this` pointer by value.
* `[this]` - capture `this` by reference.
* `[a, &b]` - capture objects `a` by value, `b` by reference.
```c++
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ A `lambda` is an unnamed function object capable of capturing variables in scope
* `[]` - captures nothing.
* `[=]` - capture local objects (local variables, parameters) in scope by value.
* `[&]` - capture local objects (local variables, parameters) in scope by reference.
* `[this]` - capture `this` pointer by value.
* `[this]` - capture `this` by reference.
* `[a, &b]` - capture objects `a` by value, `b` by reference.
```c++
Expand Down

0 comments on commit aff25ca

Please sign in to comment.