struct HasDestructor { ~HasDestructor(); }; template void callDestructor(T *x) { x->~T(); } template void callDestructor(int *x); template void callDestructor(HasDestructor *x);