|
Boost Users : |
Subject: Re: [Boost-users] fusion/adapted/mpl.hpp
From: e r (erwann.rogard_at_[hidden])
Date: 2008-09-10 15:59:51
Stjepan Rajko wrote:
> On Wed, Sep 10, 2008 at 10:01 AM, e r <erwann.rogard_at_[hidden]> wrote:
>> I wished there existed a metafun fusion_to_mpl such that
>>
>> MPL_ASSERT((is_same<fusion_to_mpl<input0_type>::type,mpl_input0_type>))
>>
>> so that the 1st version of a) could be replaced by
>>
>> typedef mpl::transform(
>> fusion_to_mpl<input0_type>::type,
>> F0
>> )::type mpl_result0_type;
>>
>
> if you #include <boost/fusion/include/mpl.hpp>, every fusion sequence
> will be a valid mpl sequence and every mpl sequence will be a valid
> fusion sequence. Hence, you can just do
>
> typedef mpl::transform<input0_type, F0>::type mpl_result0_type;
>
> Stjepan
Thanks. I hadn't realize the conversion works both ways. I tried it and
it works.
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