2 // { dg-options "-std=gnu++0x" }
6 extern "C" void abort ();
8 template<int M, int N> struct pair
11 pair () : i (M), j (N) {}
14 template<int... M> struct S
16 template<int... N> static int *foo ()
19 static int x[] = { (M + N)..., -1 };
21 static int x[1 + sizeof... N] = { (M + N)..., -1 };
27 template<typename... M> struct R
29 template<typename... N> static int *foo ()
32 static int x[] = { (sizeof(M) + sizeof(N))..., -1 };
34 static int x[1 + sizeof... N] = { (sizeof(M) + sizeof(N))..., -1 };
42 return S<0, 1, 2>::foo<0, 1, 2> ();
47 return R<char, short, int>::foo<float, double, long> ();
54 if (p[0] != 0 || p[1] != 2 || p[2] != 4 || p[3] != -1)