tools:cplusplus
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tools:cplusplus [2021/05/19 15:31] – [Lambda Functions] ursgraf | tools:cplusplus [2021/07/08 19:31] (current) – [Lambda Functions] ursgraf | ||
---|---|---|---|
Line 54: | Line 54: | ||
* Safety system: see [[eeros_architecture: | * Safety system: see [[eeros_architecture: | ||
* Function used by periodic: see [[tools: | * Function used by periodic: see [[tools: | ||
- | * Generic block: | + | * Generic block: |
- | A lambda function | + | A lambda function |
+ | <code cpp> | ||
+ | [captures] (params) {body} | ||
+ | </ | ||
+ | Captures are variables which are defined in the scope where the lambda function is defined and which can be made available to the lambda function either by value or by reference. Params are parameters which can be passed into the function like regular parameters. The body contains the code which is executed by the function. | ||
tools/cplusplus.1621431093.txt.gz · Last modified: 2021/05/19 15:31 by ursgraf