gcc/testsuite/g++.dg/cpp0x/bracket2.C
raw| 1 | // { dg-do compile { target c++11 } } |
| 2 | |
| 3 | template<int i> class X { /* ... */ }; |
| 4 | X< 1>2 > x1; // // { dg-error "numeric constant" } |
| 5 | X<(1>2)> x2; // Okay. |
| 6 | |
| 7 | template<class T> class Y { /* ... */ }; |
| 8 | Y<X<1>> x3; // Okay, same as "Y<X<1> > x3;". |
| 9 | Y<X<6>>1>> x4; // { dg-error "numeric constant" } |
| 10 | Y<X<(6>>1)>> x5; // Okay |