Boost logo

Boost Users :

From: Germán Diago (germandiago_at_[hidden])
Date: 2007-12-01 11:22:30


Hello. I'm trying to build a library and I'm doing heavy use of boost mpl
and fusion libraries. I'd like to know a way to fill a
boost::fusion::vector<>
with the types contained in a boost::mpl::vector. Anyone knows how to do
this? The code I have so far:

template <class T1, class T2, class T3, class T4, class T5, class T6, class
T7, class T8, class T9, class T10>
struct Func {

    //This is the initial sequence
    typedef typename boost::mpl::vector<T1, T2, T3, T4, T5, T6, T7, T8, T9,
T10> sequence;

   //The sequence without NullTypes
    typedef typename boost::mpl::filter_view<sequence,
boost::mpl::not_<boost::is_same<NullType, boost::mpl::_1> > >::type
validsequence;

    //The vector I want to fill with validsequence. Note that this is a
fusion vector, not a mpl vector
    typedef boost::fusion::vector<> voidvector;

    /***************PROBLEM HERE*******************/
    //I want to copy validsequence types into voidvector
    typedef typename somewaytocopy::type type;
};

Thanks in advance.



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