Older C stdio objects made it possible to walk through a set of variational arguments using tools vprintf.
Is there a similar way to go through the package of parameters of a variational template C ++ 0x without its extension?
This can be useful if you have a constructor for a derived class that accepts a package of parameters for a variational template and just needs to pass it to the constructor of the base class, rather than unpacking it.
For instance:
template <class T, class... Args>
Base::Base(const T& v, const Args&... args)
{
}
template <class T, class... Args>
Derived::Derived(const T& v, const Args&... args) : Base(v, args)
{
}
I thought you could just bypass the parameter package argswithout extending it, excluding it ...after args, but that just leads to a compiler error in GCC 4.3:
error: parameter packs not expanded with `...'
Thus, is it possible to pass a parameter package without its extension?