17 Jul
2017
17 Jul
'17
9:03 p.m.
Joaquin M López Muñoz wrote:
Something more generic can be provided
struct mp_mpl_sequence_folder { template<typename T,typename L> struct apply{using type=mp_push_front<T,L>;}; };
template<typename MplSequence> struct mp_mpl_sequence_impl:boost::mpl::reverse_fold< MplSequence, mp_list<>, mp_mpl_sequence_folder
{};
template<typename MplSequence> using mp_mpl_sequence=typename mp_mpl_sequence_impl<MplSequence>::type;
How about we provide it in MPL instead? namespace mpl { template<class Seq, template<class...> class L = std::tuple> using to_tuple = /*as above*/ } to_tuple subject to bikeshedding (to_variadic? as_variadic_sequence?).