Boost logo

Boost Users :

From: Joel de Guzman (joel_at_[hidden])
Date: 2007-02-06 18:46:05


Ovanes Markarian wrote:
> Hello all!
>
> Does someone know if the fusion library has some analog to mpl::sec_c or mpl::vector_c?

All mpl sequences can be used in fusion. An mpl::set_c or vector_c, or
even range_c are all usable in fusion. Just include the necessary files
<boost/fusion/sequence/adapted/mpl.hpp> and you're done.

> Or is there any way to pass mpl::set_c as a template parameter to fusion::set class?

If you want it converted, you simply write:

     fusion::set<...> fs = ms;

where fs is your fusion set and ms is your mpl set. Here's an example
(untested):

     typedef mpl::set_c<int,1,2,3> ms_type;
     fusion::result_of::as_set<ms_type>::type fs_type;
     fs_type fs = ms_type();

Regards,

-- 
Joel de Guzman
http://www.boost-consulting.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