I'm writing a little event manager class where I store some function pointers inside a vector. I use std::function<void(int)>
as vector type, I tested inserting inside it lambdas and normal functions and it works:
void t(int p){
/*things*/
}
[...]
event.bind([](int p){/*things*/});
event.bind(t);
Now, at a certain point I need to delete lambdas but not functions, my question is:
Is it possible to distinguish lambdas from functions? If yes, how?
Aucun commentaire:
Enregistrer un commentaire