Is it possible to define a variadic C macro that expand to give every other argument? In other words,
EVEN(A,a,B,b)
expands to
a, b
and
EVEN(A,a,B,b,C,c)
expands to
a, b, c
etc.
I can define one that takes a pre-determined number of arguments
#define EVEN(a1,a2,a3,a4,a5,a6) a2, a4, a6
but how do you define a macro that takes an arbitrary number of arguments?
#define EVEN(args...) ???