I am coding in C++ and have a few questions regarding the ellipsis:
Is it possible to pass in class or class pointer into the ellipsis?
Basi
You can pass whatever you want to variadic functions, but this won't help you in writing convenient functions as you are losing the type information for the arguments.
Depending on what you want to achieve there are better alternatives:
chaining operators like <<
or ()
:
helper() << a << b << c;
helper(a)(b)(c);
using (pseudo-)variadic templates:
template void func(T0 t0) { ... }
template void func(T0 t0, T1 t1) { ... }
// ...
// or if you can use C++0x features:
template void func(Args... args) { ... }