
14 Apr
2012
14 Apr
'12
9:30 p.m.
On Saturday 14 April 2012 22:13:36 Daniel James wrote:
'checked_delete' is used by 'shared_ptr' and is supposed to be safe for the case when the destructor isn't virtual, so this might result in warnings for valid uses of 'shared_ptr'.
My understanding is that checked_delete is intended to protect against freeing a pointer of an incomplete type, not against a missing virtual destructor. It is a tool of itself which can be used outside shared_ptr and in these cases a warning may be most appropriate. IMHO, if shared_ptr aims to support valid behavior in the lack of a virtual destructor, it should deal with the warnings itself.