Templates can take non-type function pointer parameters, but there is a problem if all possible function pointer parameters are accepted, example:
void dummy()
{
}
template <typename FT, FT* fp>
void proxy()
{
fp();
}
int main()
{
proxy<decltype(dummy), &dummy>();
return 0;
}
As you can see, this is very cumbersome. Does there exist a more convenient way to provide a "wildcard" function pointer as a non-type template parameter?