OSDN Git Service

PR c++/45114 - Support C++11 alias-declaration
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / variadic77.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     return sizeof... (pair<M, N>);      // { dg-error "mismatched argument pack lengths" }
16   }
17 };
18
19 int bar ()
20 {
21   return S<0, 1, 2>::foo<0, 1> ();
22 }