It looks like you want to use overloading
template
void test(R f(A...))
{
test(std::function(f));
}
This simple implementation will accept most if not all the functions you will try to pass. Exotic functions will be rejected (like void(int...)). More work will give you more genericity.