I have a numeric method coded using Variadic templates. I want to pass a mixture of parameters to it, some of type double and some of type vector. Minimal example;
template<typename... Ts>
using custom_function_t = double(*) (double, Ts...);
template<typename... Ts>
double BiPart(double min, double max,custom_function_t<Ts...> f,Ts... args)
double FunctionA(double A, double a, double b, vector<double> &C);
int main()
{
double a=0, b=1,x=0, y=1;
vector<double> C;
BiPart(x,y,FunctionA, a,b, &C);
return(0);
}
double FunctionA(double A, double a, double b, vector<double> &C)
{
some stuff here
}
I get the errors: 'no matching function for call to 'Bipart(...)'' 'Template argument deducation/substitution failed: inconsistent parameter pack deducation with 'std::vector&' and 'std::vector''.