I want to create a macro in which one of the parameters is the parameters for a function used within the macro.
#define Macro(PERAMS, OTHER) \
functionBeingUsed(PERAMS); \
OTHER;
Macro(1,2,3,4, int i = 0);
As you can see you can see the commas are being used by both the macro and the function. which results in broken code.
I was wondering if there was a way to achieve the result that I need so the code can be interpreted like the following.
Macro((1,2,3,4), int i = 0);
Please note I am not using C++11.