chore: add resource under cpp:functions:lambda
This commit is contained in:
1 parent
8900324234
commit
c751706631
1 file changed
+4
-1
@@ -59,4 +59,7 @@ auto updateDays = [&expiresInDays](int newDays) {
|
||||
updateDays(30); // expiresInDays = 30
|
||||
```
|
||||
|
||||
Note that, when using the capture by reference, any change made to the captured variable *inside* the lambda function will affect its value in the surrounding scope.
|
||||
Note that, when using the capture by reference, any change made to the captured variable *inside* the lambda function will affect its value in the surrounding scope.
|
||||
|
||||
- [Lambdas in C++](https://youtu.be/mwgmbbz0y8c)
|
||||
- [Lambda Expressions](https://en.cppreference.com/w/cpp/language/lambda)
|
||||
Reference in new issue
Block a user