Boost logo

Boost Users :

Subject: [Boost-users] [MPL][FUSION] generate fusion::map from mpl::vector
From: Manuel Jung (gzahl_at_[hidden])
Date: 2008-09-28 09:20:26


Hi,

I get as template parameter a mpl::vector with various types. Now want to
generate one object of each type. To do so, i like to generate a
fusion::map, which has as key the type itself (from the mpl::vector) and as
object e.g. boost::promise_stream< type >.

Well this is what i've got so far:

template< typename OutSignatures >
class filter_impl{
        typedef typename mpl::transform< OutSignatures,
boost::promise_stream<mpl::_1> >::type OutStreams;

        typedef typename mpl::transform< OutSignatures, OutStreams,
fusion::make_pair< mpl::_1, mpl::_2 > >::type OutPairs;

        typedef typename fusion::result_of::as_map< fusion::vector< OutPairs >
>::type Out_type;

}

This compiles fine. But i'm not able to generate some fusion::map from the
Out_type.
I get compiling errors than. Well I'm new to the whole MPL and fusion stuff.
Am i doing the right things? Or maybe my goal could be achived easier?

Thanks for any hints,
Kind Regards
Manuel


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