OSDN Git Service

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