Here is some C++ code I\'m playing around with:
#include
#include
#define IN ,
#define FOREACH(x,y) for(unsigned int i=0;i&l
#define IN ,
#define XFOREACH(x,y) for(unsigned int i=0;i
As previous posters have noted, the preprocessor does not expand macros in the arglist before it splits it into argument. However, as long as the macro doesn't use # or ##, it expands macros in the args before substituting them into the macro body, so an extra indirection does the trick