D | validate_rram_partitions.c | 11 #define PAIR__(f, sep, arg_first, ...) FOR_EACH_FIXED_ARG(f, sep, arg_first, __VA_ARGS__) argument 12 #define PAIR_(f, sep, args_to_expand) PAIR__(f, sep, args_to_expand) argument 13 #define PAIR(n, f, sep, ...) PAIR_(f, sep, GET_ARGS_LESS_N(n, __VA_ARGS__)) argument 18 * For example, FOR_EACH_PAIR(f, (,), 1, 2, 3, 4) should expand to: 20 * f(2, 1) , f(3, 1) , f(4, 1) , f(3, 2) , f(4, 2) , f(4, 3) 22 * @param f Macro to call. Must accept two arguments. 27 #define FOR_EACH_PAIR(f, sep, ...) \ argument 28 LISTIFY(NUM_VA_ARGS_LESS_1(__VA_ARGS__), PAIR, sep, f, sep, __VA_ARGS__)
|