Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2003-04-11 21:47:17


Preprocessing of the test case below using MSVC 6.5 produces

    0 0 0 0 0

instead of expected

    ( a, b, c ) ( a, b, c ) ( a, b, c ) ( a, b, c ) ( a, b, c )

Would it be possible to fix that one somehow?

TIA,
Aleksey

#include "boost/preprocessor/repeat.hpp"
#include "boost/preprocessor/seq/elem.hpp"

#define b( x, y ) x y
#define BODY( unused, n, tuple ) tuple

#define SOMETHING( arity, params ) \
    BOOST_PP_REPEAT( \
          arity \
        , BODY \
        , ( a, BOOST_PP_SEQ_ELEM(0, params), c ) \
        ) \
/**/

SOMETHING( 5, (b)(d) )


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