From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2005-11-05 16:11:53
> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Alex Mekhed
> sorry if I will be wrong, I am new to boost.
> As far as I know, BOOST_PP_SEQ_FOR_EACH_I works only with 256
The primary reason that SEQ_FOR_EACH_I only works for up to 256 elements is that
it passes the element index to the user-defined macro...
BOOST_PP_SEQ_FOR_EACH_I(macro, data, (a)(b)(c))
macro(r, data, 0, a) macro(r, data, 1, b) macro(r, data, 2, c)
^ ^ ^
...and the library cannot count higher than 256.
The seconary reason that SEQ_FOR_EACH_I only works for a limited number of
elements is that it is difficult to get access to the user-defined macro during
the sequential iteration. That is, it isn't hard to enumerate through any
number of elements; it's another thing altogether to call a macro for each
element. Now, I said it is difficult. It is possible (Chaos does it), but you
have to rely a great deal on the timing of expansion order--which is nearly
impossible to support on the preprocessors of some prominent compilers that
Boost must support.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk