Skip to content

Instantly share code, notes, and snippets.

@chiiph

chiiph/gist:4374879

Last active Dec 10, 2015
Embed
What would you like to do?
int nonModifiable = 42;
int modifiable = 23;
auto myLambda = [=, &modifiable]() mutable { modifiable++; nonModifiable++; };
myLambda(); // modifiable == 24, nonModifiable == 42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.