Is there a way to strip a std::tuple<T...>
in order to get it back to T...
?
Example
Suppose vct<T...>
is a pre-existing variadic class template,
using U = std::tuple<int,char,std::string>;
using X = vct<int,char,std::string>;
using Y = vct< strip<U> >; // should be same as X
Notes
I know about std::tuple_element, but I need all the elements, in a form that is usable as T...
For reference, I have found this question, which is similar, but my needs are somewhat simpler (so I hope there is a simpler solution): all I need is the list of types that are in the tuple
- I don't care about the actual values of a tuple
instance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…