Paul Mensonides wrote:
> #include <boost/preprocessor/seq/fold_left.hpp>
> #include <boost/preprocessor/seq/subseq.hpp>
> 
> #define NUMBERS \
>     (0)(1)(2)(3)(4)(5)(6)(7)(8)(9) \
>     (10)(11)(12)(13)(14)(15)(16)(17)(18)(19) \
>     /* ... */
> 
> #define RANGE(first, length) \
>     BOOST_PP_SEQ_SUBSEQ( NUMBERS, first, length ) \
>     /**/
> 
> BOOST_PP_SEQ_FOLD_LEFT(AUX_MAX_ARITY_OP, -1, RANGE(0, 5))

Hmm, it doesn't work on Metrowerks 8.3: the compiler chokes on preprocessing
with the following diagnostics:

    Error   : ',' expected
    fold_left.cpp line 19   BOOST_PP_SEQ_FOLD_LEFT(AUX_MAX_ARITY_OP, -1,
RANGE(0, 5)) 

It seems like it doesn't like BOOST_PP_SEQ_SUBSEQ - the example from the
docs fails as well:

#include <boost/preprocessor/seq/subseq.hpp>

#define SEQ (0)(1)(2)(3)(4)(5)

BOOST_PP_SEQ_SUBSEQ(SEQ, 2, 3) // expands to (2)(3)(4)

    Error   : ',' expected
    subseq.cpp line 5   BOOST_PP_SEQ_SUBSEQ(SEQ, 2, 3) // expands to
(2)(3)(4)

Is it a known failure? It would be nice to have some tests for the SEQ stuff
:).

Aleksey
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to