|
Boost : |
From: faisal vali (fvali_at_[hidden])
Date: 2003-06-04 00:35:35
Paul Mensonides wrote:
>
> > -----Original Message-----
>
<snip>
>
> >
> > #define C C
> >
> > #if C
> > X()
> > #endif
> >
> > Wave spits out that this is an ill-formed preprocessor expression -
>
> The expression of an #if (or #elif) directive should get four passes.
> The first pass handles the defined operator. Each instance of defined
> XYZ and defined(XYZ) is replaced with 0 or 1. The second pass does
> macro expansion. For the expression above, macro expansion results in
> C. The third pass converts all remaining identifier tokens, with the
> exception of true and false, with 0. (Note that that alternative tokens
> are not identifiers, so this doesn't apply to them.) Finally, yielding
> the expression 0. The fourth pass finally evaluates the expression,
> which should evaluate to false.
>
This was my understanding too, which is why I claimed that my wave
executable might be buggy. Does your wave executable also puke on the
above snippet - if it does not, then i think my wave's behavior may be
an artifact of my "dirty" fix to get the code to compile by declaring a
primary template in order to make the explicit specialization of
"policy..." well-formed. I have not studied the source code for wave
yet - and before (or if) i do, i was hoping if someone could confirm or
deny experiencing the same behavior with their wave executable.
regards,
Faisal Vali
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk