OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.brendan/] [template15.C] - Blame information for rev 305

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

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do assemble  }
2
// GROUPS passed templates
3
template class Stack {
4
  public:
5
    Stack (int s = 10);         //Comment out "= 10" and it will compile
6
    ~Stack(void);               //Omitting "void" doesn't help
7
};
8
 
9
template Stack::~Stack(void)
10
{ }
11
 
12
//If this definition comes before the one for ~Stack, the error message
13
//about redeclaration of `void Stack::~Stack()' will not occur.
14
template Stack::Stack(int s)
15
{ }
16
 
17
int main () {
18
    Stack stk(10);
19
}

powered by: WebSVN 2.1.0

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