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
Expansion for IN doesn't happen early enough in your example, but you can pass the expanded version to another macro:
IN
#define FOREACH(x) DO_FOREACH(x) #define DO_FOREACH(x,y) for( ... ) ...