I'm dealing with such a problem, I have function f(std::initializer_list<double> list)
,and I want to put a part of variable argument list (the second variable argument to end) into another function like:
void f(std::initializer_list<double> list){
f1(*(list.begin()+1,...,*(list.end-1));
}
The f1
function is normal function like void f1(double x)
or void f1(double x1,double x2)
, I want f
can do with different variable argument number of f1
, how can I get it?