You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I achieved this in my own code (where I wanted the comma-inserting list variant) with the following extra definitions:
#defineMAP_PAIR_LIST0(f, x, y, peek, ...) f(x, y) MAP_LIST_NEXT(peek, MAP_PAIR_LIST1)(f, peek, __VA_ARGS__)
#defineMAP_PAIR_LIST1(f, x, y, peek, ...) f(x, y) MAP_LIST_NEXT(peek, MAP_PAIR_LIST0)(f, peek, __VA_ARGS__)
/// Applies the function macro `f` to each pair of the remaining parameters and/// inserts commas between the results.
#defineMAP_PAIR_LIST(f, ...) EVAL(MAP_PAIR_LIST1(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0))
Is there any way to extend that macro so you can apply it to pairs of arguments?
Something like this:
The text was updated successfully, but these errors were encountered: