Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/variadic78.C

raw
1 // PR c++/33496
2 // { dg-do compile { target c++11 } }
3
4 template<int M, int N> struct pair
5 {
6 int i, j;
7 pair () : i (M), j (N) {}
8 };
9
10 template<int... M> struct S
11 {
12 template<int... N> static int *foo ()
13 {
14 static int x[] = { (M + N)... }; // { dg-error "mismatched argument pack lengths" }
15 return x;
16 }
17 };
18
19 int *bar ()
20 {
21 return S<0, 1, 2>::foo<0, 1> ();
22 }