In the stackoverflow question Template function that can take lambda or function pointer and deduce arguments for passing to another template there is a functor object created through the CreateFunctor
call. How can I use it to invoke doSomething
?
int main(){
auto f1 = CreateFunctor([](int a, int b){doSomething(a, b);}, 1, 2);
f1(1,2);
}
Does not work.
See http://ift.tt/1PH7nCC as example.
Aucun commentaire:
Enregistrer un commentaire