I am using C++11, and I need something like transform (the stl algorithm of containers) that can transform a template<typename ...T
> into <typename ...T::something>
so I can use it for inheritance :
for example:
template<typename T>
struct typeOf{
using type = T;
};
template<typename ...T> // All the arguments must be `typeOf`'s
class tupleOf : tuple<T::type...>{
}
so that :
tupleOf<typeOf<int>,typeOf<char>>
would give me a tuple<int,char>
I want to do this without using C++14 features
You may do something like:
And usage:
Live Demo.