chore: add resource under cpp:functions:lambda

pull/4026/head
roadmap bot 1 year ago
parent 8900324234
commit c751706631
  1. 5
      src/data/roadmaps/cpp/content/103-functions/100-lambda.md

@ -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)
Loading…
Cancel
Save