Boost logo

Boost Users :

Subject: [Boost-users] [boost] [fusion] Find the index of an item in a fusion map
From: Steve (steve.lorimer_at_[hidden])
Date: 2012-07-27 05:17:16


I have a fusion map in a class which I want to initialize with a variadic
constructor

template<typename... Args>
ctor(Args... args)
{
   .....
}

I imagine I would create a fusion vector using make_vector and then iterate
over the elements of the map and somehow set the value of each map pair to
it's corresponding element in the vector.

I think that if I could find the index position of a single element in the
map, that I could then use for_each to iterate over the pairs, and use the
item's index to retrieve the corresponding value from the vector.

Can anyone help me with this?

Perhaps there is an alternate better way to do this?

TIA
Steve



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