Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost][fusion] generate mpl::vector from fusion::vector
From: Roman Perepelitsa (roman.perepelitsa_at_[hidden])
Date: 2009-06-24 10:12:36


2009/6/24 Andrey Torba <andreytorba_at_[hidden]>

> BOOST_MPL_ASSERT((is_same<
> mpl::vector<int, char>,
> generate_mpl_vector<fusion::vector<int, char> >::type
> >));
>

generate_mpl_vector is boost::fusion::result_of::as_vector. I'm not sure if
the result satisfies is_same<mpl::vector<...>, res>, but at least it's
mpl::equal<mpl::vector<...>,
res>.

As to reverse conversion, I don't think there is a function for it, but
usually one doesn't need it. Including boost/fusion/include/mpl.hpp makes
all mpl sequences fusion sequences, so you can use mpl::vector<...>
wherefusion::vector<...>is expected.

Roman Perepelitsa.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net