Such function declaration
template<typename R, typename... Args1, typename... Args2>
void Func(R (*)(Args1...), Args2...)
{ // ...
}
can only be instantiated by deducing the template parameter from the argument. But do you really need Args1? What about:
template<typename R, typename... Args2>
void Func(R, Args2...)
{ // ...
}
template<typename R>
R Init(R)
{
// instantiate Func<>(R, int, float, int)
auto ptr = &Func<R, int, float, int>;
// ...
return ptr;
}
void foo(int, float) {
//
}
int main() {
Init(foo);
}