blob: d9a1c692a34cd618572f4f31af528de0baaa99fc [file] [log] [blame]
// PR c++/23287
template <class T> struct A
{
int i;
~A();
};
template <class T> void f(A<T> *ap) {
ap->~A();
}
template <class T> void g(A<T> *ap) {
ap->~B(); // { dg-error "" }
}
int main()
{
f(new A<int>);
g(new A<int>);
}