Possibility to cast a lambda to a function pointer.
It will become possible to store a lambda as a struct/member that could bind to "this" (like in Javascript).
Possibility to cast a lambda to a function pointer.
It will become possible to store a lambda as a struct/member that could bind to "this" (like in Javascript).
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.
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.