OSDN Git Service

* call.c (add_candidates): Add first_arg and return_type parms.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.brendan / template15.C
1 // { dg-do assemble  }
2 // GROUPS passed templates
3 template<class T> 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<class T> Stack<T>::~Stack(void) 
10 { }
11
12 //If this definition comes before the one for ~Stack, the error message
13 //about redeclaration of `void Stack<int>::~Stack()' will not occur.
14 template<class T> Stack<T>::Stack(int s)
15 { }
16
17 int main () {
18     Stack<int> stk(10);
19 }