Subject: Re: [boost] [exception] warning about non-virtual destructor - resolution?
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2012-04-14 17:30:03
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk