gcc/testsuite/g++.dg/cpp0x/variadic77.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 | return sizeof... (pair<M, N>); // { dg-error "" } |
| 15 | } |
| 16 | }; |
| 17 | |
| 18 | int bar () |
| 19 | { |
| 20 | return S<0, 1, 2>::foo<0, 1> (); |
| 21 | } |