There are several ways to NOT use ellipsis.
Why? Due to security types dangerous manipulation primitives ( va_start, va_arg, va_next), you can not send another function, etc.
However, contrary to C, C ++ provides template methods that offer a type of security and general behavior, and this can be accumulated with overloads:
template <typename Arg0>
void foo(int num, Arg0 const& arg0);
template <typename Arg0, typename Arg1>
void foo(int num, Arg0 const& arg0, Arg1 const& arg1);
, ( Boost.Preprocessor).
++ 0x , , C, (yeeha)
template <typename Arg0, typename... Args>
void foo(Arg0 arg0, Args... args)
{
foo(args);
}
template <typename Arg0>
void foo(Arg0 arg0)
{
}
tuple:)