M
Marc
Hello,
in C++0X, we can have functions with a number of arguments that is not
fixed, which is cool:
template<class...U> void f(double d,U... u);
However, there is a restriction that the parameter pack must be the last
argument, so I cannot write:
template<class...U> void g(U... u,double d);
I understand that having 2 parameter packs wouldn't make sense (or at
least would be much more complicated), but as long as there is just one,
I am not sure why it has to be at the end. Is it just to simplify the
partial ordering of overloads for the compiler?
I know this can be worked around with tuple manipulations (Daniel
Krügler showed me the cool technique on clc++m a couple months ago), but
it is incredibly more complicated.
in C++0X, we can have functions with a number of arguments that is not
fixed, which is cool:
template<class...U> void f(double d,U... u);
However, there is a restriction that the parameter pack must be the last
argument, so I cannot write:
template<class...U> void g(U... u,double d);
I understand that having 2 parameter packs wouldn't make sense (or at
least would be much more complicated), but as long as there is just one,
I am not sure why it has to be at the end. Is it just to simplify the
partial ordering of overloads for the compiler?
I know this can be worked around with tuple manipulations (Daniel
Krügler showed me the cool technique on clc++m a couple months ago), but
it is incredibly more complicated.