Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2002-05-30 00:52:18


From: "Vesa Karvonen" <vesa_karvonen_at_[hidden]>

> Cool! This technique should work on all preprocessors. Yesterday I
> wrote an implementation of the WHILE macro that does not require one to
> explicitly pass the recursion depth as a parameter. (I don't have access
> to the CVS at the moment.)
>
> BTW: You don't need to use CONCAT()(X,Y) you can also just use
> CONCAT(X,Y) simply by not making the macro a function style macro.

Yes, but using it without parentheses means that I can't pass around the name of
the macro without it expanding prematurely. I'm not sure yet whether that
really matters, but it theoretically could. If something was evaluated to soon,
it could yield bad results *theoretically*. Of course, it would be easy to
define both:

#define SIMPLE_CONCAT CONCAT()
SIMPLE_CONCAT(X, Y)

Paul Mensonides


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk