Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost][fusion] generate mpl::vector from fusion::vector
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-06-24 10:41:25


AMDG

Roman Perepelitsa wrote:
> 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.
>

In particular, boost::mpl::copy<boost::fusion::vector<int, char>,
boost::mpl::back_inserter<boost::mpl::vector0<> > >::type

In Christ,
Steven Watanabe


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