4 ms·
I assume this is only for stateless lambdas, that have not captured anything? Because otherwise a function pointer would not be enough, right? Currently, any s
by hellofunk 10y ago
I assume this is only for stateless lambdas, that have not captured anything? Because otherwise a function pointer would not be enough, right?
Currently, any stateless lambda can decompose into a function pointer and be passed to any function that expects a function pointer, right?
Are you saying that ++17 has augmented this, and if so can you provide more details or a reference (or an example) as I'm quite curious to know more.
- vmorgulis 10y agohttps://isocpp.org/files/papers/p0018r3.html https://isocpp.org/files/papers/p0018r3.html It's the best reference I found. The paper only talks of capturing "*this" by value (as in the original post of the topic). I think I read that in a draft about coroutines. The idea was to capture "this" by reference and convert the lambda to a function pointer to make it movable. It would useful for delegates or signals too.