[Boost-users] Fusion container from MPL typelist?

115 views
Skip to first unread message

Zachary Turner

unread,
Jul 17, 2009, 10:41:42 PM7/17/09
to boost...@lists.boost.org
Suppose I have a boost::mpl::vector<...> and I want a
boost::fusion::vector<...> whose types correspond exactly to the types
in the mpl::vector. Is there a simple way to go about this? It seems
like all the methods of constructing a fusion vector require me to
manually specify the individual types as the parameters to
fusion::vector<>.
_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Joel de Guzman

unread,
Jul 17, 2009, 10:45:51 PM7/17/09
to boost...@lists.boost.org
Zachary Turner wrote:
> Suppose I have a boost::mpl::vector<...> and I want a
> boost::fusion::vector<...> whose types correspond exactly to the types
> in the mpl::vector. Is there a simple way to go about this? It seems
> like all the methods of constructing a fusion vector require me to
> manually specify the individual types as the parameters to
> fusion::vector<>.

as_vector:

http://tinyurl.com/nmx8z2
http://tinyurl.com/mbzt2n

(be sure to #include <boost/fusion/include/mpl.hpp>)

Regards,
--
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net

Reply all
Reply to author
Forward
0 new messages