Consider I have the following:
void bar(int a, int b)
{
}
template
void foo(F function, Args... args>
{
function(a
Trivial and hardly extensible solution would be to create a wrapper, that will be called with all arguments, but will use only first few of them.
template
void foo(F function, Args... args)
{
// with proper forwarding if needed
auto lambda = [](auto fnc, auto first, auto second, auto...)
{
fnc(first, second);
};
lambda(function, args...);
}