If you pass a lambda function by copy in c++ what actually gets copied?
Is it just a pointer to the lambda?
Or does the whole capture list get copied as well?
If you pass a lambda function by copy in c++ what actually gets copied?
Is it just a pointer to the lambda?
Or does the whole capture list get copied as well?
Lambda functions are usually realized as compiler generated functor classes.
Or does the whole capture list get copied as well?
The captures go to the class internal data members, and those will be copied.