URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [ref3.C] - Rev 12
Compare with Previous | Blame | View Log
// { dg-do run }
// Origin: John Wilkinson <jfw@sgi.com>
template <class T, int& Size>
struct Base {
Base() : obj(Size) {}
T obj;
};
int globalInt = 5;
struct A {
A(int arg) : ia(arg) {}
int ia;
};
int main()
{
Base<A, globalInt> ob;
if (ob.obj.ia != 5)
return 1;
}