Skip to content

Glossary: C++ Beyond the Basics

Capture

Also written: captures, capture list, [=], [&], [this]

How a lambda takes variables from around it, listed in `[]`: by copy (`[limit]`), by reference (`[&total]`) or `[this]` for an object's members. A reference capture must not outlive its variable.

Where the book teaches it

Related terms

LambdaClosureInit capture