c++ var-arg macro, NOT template
- by anon
I need this to be a macro. Do not answer about templates. [This is part of a larger system that can not be represented as a template.]
Is it possible to define a macro "foo" so that
foo(a) --> foo1(a);
foo(a, b) --> foo2(a, b);
foo(a, b, c) --> foo3(a, b, c);
Basically, I want this macro to expand to a different macro depending on the number of args it has. Pretty much, I want number_of_(__VA_ARGS) as a symbol.
Thanks!