I'm serching for a way to pass a function pointer with undefined parameter count and type as template argument.
In my research I've already found this
STC<void (*)()> s(foo2, fp); // like this
So it seems like it is possible to pass function pointers as template parameter in general. My question would now be if it is possible to do something like this
STC<void (*)(T&&... t)> s(foo2, fp);
Additional information: The class which I would like to pass the function pointer should only hold a list of functions in an array and has no further functions.
Aucun commentaire:
Enregistrer un commentaire