|
|
|
|
|
by usefulcat
1617 days ago
|
|
I feel like some people may be assuming that a capturing lambda must necessarily dynamically allocate memory, and that's just not always true. The large majority of lambdas that I have written in c++ didn't need to do any dynamic allocation because they were used in (and only in) the scope where they were defined. Most of the time the compiler probably just inlined them. |
|