Re:The Evolutions of Lambdas in C++14, C++17 and C++20
by agent327 on Monday December 13, 2021 @09:35AM
(#29539919)
There is no dynamic allocation at all, unless you assign the lambda to an std::function, in which case it _may_ require dynamic allocation if the size of the captured variables exceed the internal storage capacity (typically 32 bytes) of std::function. There are types (usually called 'function_view') floating around that don't dynamically allocate at all, and that can be used as a cheap alternative when the function is not stored for later use.
[ Parent
| on HN ]
There are no comments on this comment yet.