Skip to content

Instantly share code, notes, and snippets.

@ox1111
Created March 6, 2019 04:28
Show Gist options
  • Save ox1111/0e647b35bdf9ca473f02d511d75666f1 to your computer and use it in GitHub Desktop.
Save ox1111/0e647b35bdf9ca473f02d511d75666f1 to your computer and use it in GitHub Desktop.

[&] : capture by reference , all automatic storage duration variable declared in th reaching scope

[=] : capture by value, a value is copied

[x,&y] : capture x by value and y by a reference explicitly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment