Preprocessor lib question -- how to fold a macro that produces comma in its output across a sequence?
Hi, I am trying to use the preprocessor lib to generate something like
Cons > > >
from
(a) (b) (c) (d)
I tried something like
#define START(x) Cons
on Tue Oct 30 2007, Yu Di
Hi, I am trying to use the preprocessor lib to generate something like
Cons > > >
from
(a) (b) (c) (d)
The easy way to do things like this is to take advantage of the fact
that the PP can generate invalid fragments of syntax, so something
like:
// not tested -- I may have the argument order wrong among other things
#define cons_open(z, e, _) Cons
participants (2)
-
David Abrahams
-
Yu Di