Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/variadic-partial3.C

raw
1 // PR c++/89231
2 // { dg-do compile { target c++11 } }
3
4 template<class... Ps>
5 struct A {
6 template<int... Ns>
7 struct Collect { };
8
9 template<int C, int I = 0, class S = Collect<>>
10 struct Seq;
11
12 template<int C, int I, int... N>
13 struct Seq<C, I, Collect<N...>> : Seq<C - 1, I + 1, Collect<N..., I>> { };
14
15 template<int I, int... N>
16 struct Seq<0, I, Collect<N...>> : Collect<N...> { };
17 };
18
19 A<int>::Seq<4> test;