スポンサーリンク
template<int I, typename Head, typename... T> struct Tget { using type_t = typename Tget<I - 1, T...> ::type_t; }; template<typename Head, typename... T> struct Tget<0, Head, T...> { using type_t = Head; }; int main() { using t1 = Tget<2, char, int, double>::type_t; std::cout << "sizeof " << sizeof( t1 ) << std::endl; int i; std::cin >> i; return 0; }