URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do assemble }
|
// { dg-do assemble }
|
// GROUPS passed templates
|
// GROUPS passed templates
|
template class Stack {
|
template class Stack {
|
public:
|
public:
|
Stack (int s = 10); //Comment out "= 10" and it will compile
|
Stack (int s = 10); //Comment out "= 10" and it will compile
|
~Stack(void); //Omitting "void" doesn't help
|
~Stack(void); //Omitting "void" doesn't help
|
};
|
};
|
|
|
template Stack::~Stack(void)
|
template Stack::~Stack(void)
|
{ }
|
{ }
|
|
|
//If this definition comes before the one for ~Stack, the error message
|
//If this definition comes before the one for ~Stack, the error message
|
//about redeclaration of `void Stack::~Stack()' will not occur.
|
//about redeclaration of `void Stack::~Stack()' will not occur.
|
template Stack::Stack(int s)
|
template Stack::Stack(int s)
|
{ }
|
{ }
|
|
|
int main () {
|
int main () {
|
Stack stk(10);
|
Stack stk(10);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.