[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / template / dtor5.C
blob8fa4eeb6f069176f4a239094d622d34571044b93
1 // PR c++/23287
3 template <class T> struct A
5   int i;
6   ~A();
7 }; 
9 template <class T> void f(A<T> *ap) {
10   ap->~A(); 
11
13 template <class T> void g(A<T> *ap) {
14   ap->~B();                     // { dg-error "destructor name" }
15
17 int main()
19   f(new A<int>);
20   g(new A<int>);