[MPL] sequence from paramater pack

How do you construct a MPL sequence from a variadic template parameter pack?

How do you construct a MPL sequence from a variadic template parameter pack?
Should be as simple as: #include <boost/mpl/vector.hpp> template <typename... Args> struct make_mpl_vector { typedef boost::mpl::vector<Args...> type; }; typedef make_mpl_vector<int, float, char>::type type; Regards, Nate

On 10/13/2013 4:10 PM, Nathan Ridge wrote:
How do you construct a MPL sequence from a variadic template parameter pack?
Should be as simple as:
#include <boost/mpl/vector.hpp>
template <typename... Args> struct make_mpl_vector { typedef boost::mpl::vector<Args...> type; };
typedef make_mpl_vector<int, float, char>::type type;
Thanks just passing Args... to mpl::vector works wonderfully.
participants (2)
-
Michael Marcin
-
Nathan Ridge