I have two macros FOO2 and FOO3:
FOO2
FOO3
#define FOO2(x,y) ... #define FOO3(x,y,z) ...
I want to define a new macro
Maybe you can use this macro to count the number of arguments.
#define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL(__VA_ARGS__, 5,4,3,2,1) #define VA_NUM_ARGS_IMPL(_1,_2,_3,_4,_5,N,...) N