mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-01-18 14:48:46 +01:00
chore: add resource under cpp:functions:lambda
This commit is contained in:
parent
8900324234
commit
c751706631
@ -59,4 +59,7 @@ auto updateDays = [&expiresInDays](int newDays) {
|
|||||||
updateDays(30); // expiresInDays = 30
|
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)
|
Loading…
x
Reference in New Issue
Block a user