I have a class that is expected to take std::tuple
of certain types (arbitrary count is allowed) as a template argument. I want to declare a tuple of vectors of the types. For instance, I have
template <typename T>
class MyClass {/*...*/}
I instantiate it
MyClass<std::tuple<int, bool>> my_class;
and I aim to create a field like this
std::tuple<std::vector<int>, std::vector<bool>> my_tuple;
I know that if I had a class definition
template <typename... T>
class MyClass2 {/*...*/}
I could instantiate it by passing the data types without a tuple
MyClass<int, bool> my_class2;
and then simply create the field
std::tuple<std::vector<int>, std::vector<bool>> my_tuple2;
using
std::tuple<std::vector<T>...> my_tuple2;
Hence, I was thinking that I should somehow unpack the data types from the tuple. Is it possible?