So basically, I would like to redefine this part of code using macros,
switch(count) {
case 0:
variadic();
case 1:
variadic(array[0]);
case 2;
variadic(array[0], array[1]);
case 3:
variadic(array[0], array[1], array[2]);
...
}
My constraint is that variadic is a function that CANNOT be passed a count, so I cannot pass the array by reference. This way works just fine, but I want to know if I can do this using a macro, or in a better way, I don't mind if the number of arguments is limited, since right now, I only handle 6 anyways.
Thank you.