mirror of
https://github.com/AnthonyCalandra/modern-cpp-features.git
synced 2025-12-17 10:04:35 +03:00
Fix incorrect lambda expression capture of [this].
This commit is contained in:
2
CPP11.md
2
CPP11.md
@@ -211,7 +211,7 @@ A `lambda` is an unnamed function object capable of capturing variables in scope
|
|||||||
* `[]` - captures nothing.
|
* `[]` - captures nothing.
|
||||||
* `[=]` - capture local objects (local variables, parameters) in scope by value.
|
* `[=]` - capture local objects (local variables, parameters) in scope by value.
|
||||||
* `[&]` - capture local objects (local variables, parameters) in scope by reference.
|
* `[&]` - 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.
|
* `[a, &b]` - capture objects `a` by value, `b` by reference.
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
|
|||||||
@@ -1371,7 +1371,7 @@ A `lambda` is an unnamed function object capable of capturing variables in scope
|
|||||||
* `[]` - captures nothing.
|
* `[]` - captures nothing.
|
||||||
* `[=]` - capture local objects (local variables, parameters) in scope by value.
|
* `[=]` - capture local objects (local variables, parameters) in scope by value.
|
||||||
* `[&]` - capture local objects (local variables, parameters) in scope by reference.
|
* `[&]` - 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.
|
* `[a, &b]` - capture objects `a` by value, `b` by reference.
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
|
|||||||
Reference in New Issue
Block a user