I have a function that needs a variable number of arguments:
template<typename... Args>
void some_func(int something, Args... args)
{
...
}
This function is about ~60 lines and requires three includes. I would prefer the function implementation (and includes) to be in the .cpp file.
Is there any way to to this? I understand c style variadic arguments exist but I prefer a C++ solution. I was thinking there may be some helper template I can create.
If not I suppose I will just deal with it or maybe wrap the function like this:
template<typename... Args>
void some_func(int something, Args... args)
{
//Do something with args and get result
//this is implemented in .cpp file
internal_some_func(result);
}