Question: ```
    template<int... Is>
    struct seq { };

    template<int N, int... Is>
    struct gen_seq : gen_seq<N - 1, N - 1, Is...> { };

    template<int... Is>
    struct gen_seq<0, Is...> : seq<Is...> { };

```

when call gen\_seq<3> get the final struct seq<0, 1, 2>{} type, I can not understand the "struct seq<0, 1, 2>{}" data type meaning? it means a struct contains three numbers?

Answer: 
It is the usage of [Variadic template](https://en.wikipedia.org/wiki/Variadic_template), which can take any number of parameters. You can check call stack using `__PRETTY_FUNCTION__` in the constructor of these structs.

```
#include <iostream>
template<int... Is>
struct seq { 
    seq(){std::cout<<__PRETTY_FUNCTION__<<std::endl;}
};

template<int N, int... Is>
struct gen_seq : gen_seq<N - 1, N - 1, Is...> { 
    gen_seq(){std::cout<<__PRETTY_FUNCTION__<<std::endl;}
};

template<int... Is>
struct gen_seq<0, Is...> : seq<Is...> { 
    gen_seq(){std::cout<<__PRETTY_FUNCTION__<<std::endl;}
};
int main() {  
    gen_seq<3> t;
}

```

Output:

```
seq<0, 1, 2>::seq() [Is = <0, 1, 2>]
gen_seq<0, 0, 1, 2>::gen_seq() [N = 0, Is = <0, 1, 2>]
gen_seq<1, 1, 2>::gen_seq() [N = 1, Is = <1, 2>]
gen_seq<2, 2>::gen_seq() [N = 2, Is = <2>]
gen_seq<3>::gen_seq() [N = 3, Is = <>]

```
It's an object of a *type* containing three numbers. The object has no data members.

It's used to carry around a template parameter pack (of `int`s) as a single value, e.g.

```
template <typename UnaryOperation, typename... Ts, int... Is>
std::tuple<Ts...> tuple_for_impl(UnaryOperation op, std::tuple<Ts...> input, seq<Is...> /*unused*/) {
    return { op(std::get<Is>(input))... };
}

template <typename UnaryOperation, typename... Ts>
std::tuple<Ts...> tuple_for(UnaryOperation op, std::tuple<Ts...> input) {
    return tuple_for_impl(op, input, gen_seq<sizeof...(Ts)>{});
}

```

In C++14, it is included in the standard library, as [`std::integer_sequence`](https://en.cppreference.com/w/cpp/utility/integer_sequence)