FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.brendan / template15.C
blobb830505e2098ad843a54d52da487aeda123758f5
1 // Build don't link: 
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 }; 
9 template<class T> Stack<T>::~Stack(void) 
10 { }
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 { }
17 int main () {
18     Stack<int> stk(10);