Boost logo

Boost Users :

Subject: Re: [Boost-users] [fusion] simple Fusion question
From: Joel de Guzman (joel_at_[hidden])
Date: 2010-11-02 08:23:16


On 11/2/2010 12:22 PM, Eric Niebler wrote:
>
> Given an mpl::vector of keys, and a fusion::vector of values, what's the
> easiest way to create a fusion::map?
>
> The obvious solution of just zipping the two sequences and passing the
> result to fusion::as_map doesn't work because as_map (somewhat narrowly)
> requires all elements to be fusion::pair, and Fusion's zip algorithm
> produces sequences of vector2. I'd like to see this generalized so that
> (a) as_map only requires sequences of 2-tuples and (b) fusion::pair
> meets the requirements for 2-tuples.

Makes perfect sense. Do you have a patch?

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net

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