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] - Diff between revs 305 and 338

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);
}
}
 
 

powered by: WebSVN 2.1.0

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