Boost logo

Boost :

From: John Harris (TT) (john.harris_at_[hidden])
Date: 2002-04-19 07:47:32

Sorry, I haven't figured out how to reply if I'm not receiving e-mail from
the list, to keep the thread intact.

Vesa wrote:

        From: "John Harris (TT)" <john.harris_at_[hidden]>
> I found that it compiles fine on MSVC with 100, but invocation of
> breaks (compiler runs forever) somewhere between 60 and 75.
> I need it to generate enum type declarations and char array
> lists, and 16 is kind of low for a few of our enums.

        How do you iterate the tuple elements? Do you use BOOST_PP_REPEAT()
or do
        you convert the tuple to a list and use BOOST_PP_LIST_FOR_EACH()?

        Is the syntax very important?

        It is possible to build lists that are much longer than the tuple
limit 16
        by using the following technique:

            ( N
            , BOOST_PP_TUPLE_TO_LIST(M, (E11, E12, ..., E1M) )
            , BOOST_PP_TUPLE_TO_LIST(M, (E21, E22, ..., E2M) )
            , ...
            , BOOST_PP_TUPLE_TO_LIST(M, (EN1, EN2, ..., ENM) )

        BOOST_PP_LIST_FOLD_RIGHT_2ND() macro is not available in the current
        release, but it is available in the CVS.

This may do what I want, although I must admit I can't grok your expression
(what is APPEND_D?). Upon further examination of my macros (which I can't
publish), I recalled that the only reason I need big tuples is because I
didn't want my end-users to have to construct lists using the nested syntax,
where they have to remember to put a LIST_NIL and the right number of
closing parens. So if I can deliver macros that allow a tuple of lists,
like what you've shown, that would probably do. Ideally, I would want a
syntax that was not nested and allowed an arbitrary number of elements, the
number of which I didn't have to specify, but I suspect that's asking for
the moon.

My initial tests using APPEND with two lists showed that I could go over 64
(which turned out to be the limit beyond which MSVC freaked out) by
appending two lists.


Boost list run by bdawes at, gregod at, cpdaniel at, john at