Get the Nth type of variadic template templates?

c++, variadic-templates

Solution

You can use `std::tuple`:

#include<tuple>

template<typename... Args>
class MyClass
{
    typename std::tuple_element<0, std::tuple<Args...> >::type mA;
};

Problem

How to get the Nth type of variadic template templates? For example ``` template<typename... Args> class MyClass { Args[0] mA; // This is wrong. How to get the type? }; ```

Original source