I have an std::tuple given like this:
typedef std::tuple<t1, t2, t3> tuple_t;
Now, I want to transform t3_tuple into a similar tuple:
typedef std::tuple< T<t1>, T<t2>, T<t3> > derived_tuple_t;
In my case, for example, t1
, t2
, and t3
are primitives, and T
is std::stack
. In general, assume that that there might be t4
and so on.
Of course, my second definition already solves the problem, but I'd like the deriving to be automatic: Given only T
and tuple_t
, build me derived_tuple_t
. Like this:
template <class T, class tuple_t> using derived_tuple_t = std::tuple</*???*/>;
Is something like this possible? Maybe a short solution?