Suppose I have a global function pointer like so:
void (*Callback)(My_special_t*);
If I want to assign it a lambda I do so like so:
Callback = [](My_special_t* instance) {
//Useful stuff
};
What I really would like to do is something like this:
Callback = [](My_special_t* instance) {
//Useful stuff
Callback = /* Somehow get the current lambda? */
};
So my question is this:
Is it possible to reference the a lambda object from inside of itself.....and if so how?