C - Variadic macro which expands into set of macro calls on each argument
问题 I want to have a single macro call which takes in multiple function pointers, and each function pointer is called by a second macro which is a function declaration. I want two macros on the form #define FUNCTION_DEF(func) extern int func(void); #define FUNCTION_DEFS(...) (???) which is called as such FUNCTION_DEFS( myFunc1, myFunc2, otherFunc1, otherFunc2, defaultFunc ) which expands into FUNCTION_DEF(myFunc1) FUNCTION_DEF(myFunc2) FUNCTION_DEF(otherFunc1) FUNCTION_DEF(otherFunc2) FUNCTION