My question was more of if you have multiple statements, instead of a single expression, you wanted to stick inside a macro and preserve the ability to call it within another expression.
For example:
#define SOMEMACRO(x) do { \
int y=0; \
for(int i=0; i<x; i++) \
y=dosomething(y, i); \
} while (0)
Which, of course, works fine if you call it as a statement. But it doesn't work if you want to somehow "return" the value of "y" from that: there's no way to embed that kind of loop into an expression.He showed an example of using Apple's Blocks to solve that, can you do the same with C++0x lambdas?