From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2003-04-29 05:56:36
Paul Mensonides wrote:
> Okay, this is "fixed," but before you update, this is the reduction
> of the problem. First, it has nothing to do with BOOST_PP_REPEAT
> per se. Rather it is the kind of instability that I mentioned before
> relative to IS_UNARY, since SEQ_ELEM does a similar kind of thing.
> Take a look:
> #include <boost/preprocessor/seq/elem.hpp>
> #define X() ...
> #define A(seq) BOOST_PP_SEQ_ELEM(0, seq)
> #define B(seq) (BOOST_PP_SEQ_ELEM(0, seq))
> #define C(seq) ID( BOOST_PP_SEQ_ELEM(0, seq) )
> #define D(seq) ID(( BOOST_PP_SEQ_ELEM(0, seq) ))
> #define ID(x) x
> A( (X)(Y) ) // X
> B( (X)(Y) ) // (X)
> C( (X)(Y) ) // X
> D( (X)(Y) ) // 0
> The last one is wrong. It should expand to (X). This should be
> fixed now, but it illustrates the kind of encapsulation issues that
> I was referring to before.
Thank you! The fix is greatly appreciated.
> As far as the other bug is concerned, here is the reduction
> of the problem:
> // entire file...
> #define M()
> VC6 expects to find the open parentheses of a macro invocation, but
> instead it finds EOF. There is nothing that I can do to fix this one.
Oh well. Thanks anyway!
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk