Boost logo

Boost Users :

Subject: Re: [Boost-users] mpl::map ---> fusion::map conversion problems
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-08-11 13:52:08


AMDG

Zachary Turner wrote:
> On Mon, Aug 10, 2009 at 10:37 PM, Zachary Turner<divisortheory_at_[hidden]> wrote:
>
>> Hello, I'm trying to convert an MPL map to a fusion map using
>> boost::fusion::result_of::as_map. I have the following code, with
>> some of the leading-in code omitted for brevity although I don't think
>> it's relevant:
>>
>
> Heh, apparently all I need to do was
>
> #include <boost/fusion/include/mpl.hpp>
>
> In the process I ran across the documentation for the mpl adapted
> sequences (http://www.boost.org/doc/libs/1_39_0/libs/fusion/doc/html/fusion/adapted/mpl_sequence.html).
> Is there any difference between using result_of::as_map and this
> approach? With the adapted approach, can I simply declare an mpl::map
> on the stack and modify its internal items at runtime?
>

An mpl::map doesn't store any data members.
when it is viewed as a fusion sequence, the
values are default constructed on the fly.

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