Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / variadic77.C
blob43f2d1e43d8c57ffc281d91116588e9c7027f924
1 // PR c++/33496
2 // { dg-do compile }
3 // { dg-options "-std=gnu++0x" }
5 template<int M, int N> struct pair
7   int i, j;
8   pair () : i (M), j (N) {}
9 };
11 template<int... M> struct S
13   template<int... N> static int foo ()
14   {
15     return sizeof... (pair<M, N>);      // { dg-error "mismatched argument pack lengths" }
16   }
19 int bar ()
21   return S<0, 1, 2>::foo<0, 1> ();