URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [template/] [dependent-name3.C] - Rev 12
Compare with Previous | Blame | View Log
// { dg-do compile }
// Dependent arrays of invalid size generate appropriate error messages
template<int I> struct A
{
static const int zero = 0;
static const int minus_one = -1;
};
template<int N> struct B
{
int x[A<N>::zero]; // { dg-error "zero" }
int y[A<N>::minus_one]; // { dg-error "negative" }
};
B<0> b;