mpl sequence -> tuple

9 Jul
2008
9 Jul
'08
9:48 p.m.
Is there anything in boost that creates a tuple of the types in a MPL sequence? -- Cory Nelson

9 Jul
9 Jul
10:03 p.m.
AMDG Cory Nelson wrote:
Is there anything in boost that creates a tuple of the types in a MPL sequence #include <boost/tuple/tuple.hpp> #include <boost/mpl/vector.hpp> #include <boost/mpl/reverse_fold.hpp> #include <boost/mpl/assert.hpp> #include <boost/type_traits/is_same.hpp>
typedef boost::mpl::vector<int, char, double> types; typedef boost::mpl::reverse_fold<types, boost::tuples::null_type, boost::tuples::cons<boost::mpl::_2, boost::mpl::_1> >::type tuple_type; In Christ, Steven Watanabe
6188
Age (days ago)
6188
Last active (days ago)
1 comments
2 participants
participants (2)
-
Cory Nelson
-
Steven Watanabe