I have a pointer to std::function
that stores lambda inside. How can I call that lambda?
example:
std::function <void()>* fx = new std::function <void()>([] {std::cout << "Hello world;\n"; });
//here i need to call my fx, just fx(); does not works in this case
fx
may be stored inside std::pair
Aucun commentaire:
Enregistrer un commentaire