mpl sequence -> tuple

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

10 Jul
10 Jul
4:03 a.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
6163
Age (days ago)
6163
Last active (days ago)
1 comments
2 participants
participants (2)
-
Cory Nelson
-
Steven Watanabe