1 2 3 4 5 6 7 8 9 10 11 12 13
template <typename T> class HandleWithDtor { T* ptr; ~HandleWithDtor() {} }; typedef HandleWithDtor<int> HandleValue; class WithoutDtor { HandleValue shouldBeWithDtor; };