Boost logo

Boost :

Subject: Re: [boost] BOOST_PP_ITERATE for huge mpl and fusion
From: Hite, Christopher (Christopher.Hite_at_[hidden])
Date: 2012-03-20 13:20:02


Hite, Christopher wrote:
> Joel de Guzman wrote:
> > No, Fusion does not use MPL's techniques at all. It does not use any scripts to generate the prepreocessed headers. Instead, Fusion uses Wave. Ditto for Phoenix-3. Going beyond the limts is very simple: simply #define BOOST_FUSION_DONT_USE_PREPROCESSED_FILES.

> Awesome!!! That's what I was looking for. I didn't find it because of the order gcc's stack of header includes.

Wait sorry, I'm still not out of the woods yet. If I leave out the #if'ed stuff below it doesn't compile.

It's still much better than it was before, but it seems like I shouldn't have to do this either.

#define BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#define FUSION_MAX_MAP_SIZE ULTIMATE_N
#define FUSION_MAX_VECTOR_SIZE ULTIMATE_N

#if 1 // required for some reason
#include <boost/fusion/include/vector50.hpp>

    namespace boost { namespace fusion
    {
        struct vector_tag;
        struct fusion_sequence_tag;
        struct random_access_traversal_tag;

    // expand vector41 to vector50
    #define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/vector_n.hpp>
    #define BOOST_PP_ITERATION_LIMITS (51, ULTIMATE_N)
    #include BOOST_PP_ITERATE()

    }}
#endif

#include <boost/fusion/container/vector.hpp>

129 errors:

In file included from /fs/tools/L3/boost_1_49_0/boost/fusion/container/vector/vector.hpp:11:0,
                 from /fs/tools/L3/boost_1_49_0/boost/fusion/container/vector.hpp:26,
                 from decode_separate_xetra.cpp:68:
/fs/tools/L3/boost_1_49_0/boost/fusion/container/vector/detail/vector_n_chooser.hpp:65:1: error: 'vector70' does not name a type
In file included from /fs/tools/L3/boost_1_49_0/boost/preprocessor/iteration/detail/iter/forward1.hpp:302:0,
                 from /fs/tools/L3/boost_1_49_0/boost/fusion/container/vector/detail/vector_n_chooser.hpp:77,
                 from /fs/tools/L3/boost_1_49_0/boost/fusion/container/vector/vector.hpp:11,
                 from /fs/tools/L3/boost_1_49_0/boost/fusion/container/vector.hpp:26,
                 from decode_separate_xetra.cpp:68:
/fs/tools/L3/boost_1_49_0/boost/fusion/container/vector/detail/vector_n_chooser.hpp:103:1: error: 'vector51' does not name a type
In file included from /fs/tools/L3/boost_1_49_0/boost/preprocessor/iteration/detail/iter/forward1.hpp:307:0,
                 from /fs/tools/L3/boost_1_49_0/boost/fusion/container/vector/detail/vector_n_chooser.hpp:77,
                 from /fs/tools/L3/boost_1_49_0/boost/fusion/container/vector/vector.hpp:11,
                 from /fs/tools/L3/boost_1_49_0/boost/fusion/container/vector.hpp:26,

Chris


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