Variadic recursive preprocessor macros – is it possible?
It’s possible to write a macro that evaluates to the number of arguments it’s called with. (I couldn’t find a link to the place where I first saw it.) So you could write MAX_OF_N() that would work as you’d like, but you’d still need all the numbered macros up until some limit: #define MAX_OF_1(a) (a) … Read more