Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2007-11-29 19:50:58

Stjepan Rajko wrote:
> Hello,
> I am having problems getting fusion sequences to work with MPL. The
> docs indicate this should be possible , e.g. the "Adapted" page
> states,
> "Fusion sequences may also be adapted as fully conforming MPL
> sequences (see Intrinsics)." I couldn't find more information on the
> Intrinsics page regarding the use of fusion sequences with MPL, but I
> tried:
> #include <boost/mpl/is_sequence.hpp>
> #include <boost/fusion/container/vector.hpp>
> #include <boost/fusion/sequence/intrinsic.hpp>
> int main()
> {
> BOOST_MPL_ASSERT(( boost::mpl::is_sequence<fusion::vector<int> > ));
> }


#include <boost/mpl/is_sequence.hpp>
#include <boost/fusion/include/vector.hpp>
#include <boost/fusion/include/mpl.hpp>

int main()
     BOOST_MPL_ASSERT(( boost::mpl::is_sequence<boost::fusion::vector<int> > ));

mpl.hpp does the mapping

(BTW. Not really relevant, but, there's a nifty flat "include" directory
where you can find all the includes which forwards to all modules.
Like MPL flat include structure.)



Joel de Guzman

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