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 ~Stack(void)9template<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. Stack(int s)14template<class T> Stack<T>::Stack(int s) 15 { } 16 main()17int main () { 18 Stack<int> stk(10); 19 } 20