template class HandleWithDtor { T* ptr; ~HandleWithDtor() {} }; typedef HandleWithDtor HandleValue; class WithoutDtor { HandleValue shouldBeWithDtor; };