OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [template/] [static3.C] - Blame information for rev 825

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
template  class foo
2
{
3
    public:
4
        static const int a;
5
        static const int b;
6
        static const int c;
7
        static const int d;
8
};
9
 
10
template  const int foo::a = 1;
11
template  const int foo::b = a;
12
template  const int foo::c = b;
13
template  const int foo::d = c;
14
 
15
typedef foo fooInt;
16
 
17
int main( void )
18
{
19
    fooInt *f;
20
 
21
    f = new fooInt();
22
 
23
    if (f->c != 1 || f->d != 1)
24
      return 1;
25
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.