Skip to content

Glossary: C++ Beyond the Basics

mutable (lambda)

Also written: mutable

A keyword after a lambda's parameters that lets it change its captured copies, which are `const` by default: `[n = 100]() mutable { return ++n; }`.

Where the book teaches it

Related terms

CaptureInit capture