int max(int n, int ... rest)
{
//Do stuff
}
Why is something like this not allowed? If you want to create a function that accepts variadic function arguments, you are forced to use templates and typenames. However, even if you know that you will only accept arguments of a certain type (int in this case), why does C++ force you to do
template <typename ... N>
int max(int n, N ... rest)
{
//Do stuff
}