Opened 12 years ago

#4830 new Feature Requests

generalize fusion::as_map and fusion::pair

Reported by: Eric Niebler Owned by: Joel de Guzman
Milestone: To Be Determined Component: fusion
Version: Boost 1.44.0 Severity: Problem
Keywords: fusion as_map pair Cc:

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.