Boost logo

Boost :

Subject: Re: [boost] Official warnings policy?
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-11-05 19:23:56

On Thu, Nov 5, 2009 at 3:46 PM, Kim Barrett <kab.conundrums_at_[hidden]> wrote:
> On Nov 5, 2009, at 5:32 PM, Emil Dotchevski wrote:
>> On Thu, Nov 5, 2009 at 1:50 PM, Kim Barrett <kab.conundrums_at_[hidden]>
>> wrote:
>>> On Nov 5, 2009, at 2:04 PM, Emil Dotchevski wrote:
>>>> - non-virtual-dtor on GCC contradicts a valid design choice.
>>> At least in recent versions of gcc, this warning is not generated when
>>> there is a non-public dtor.
>> This doesn't help much. [...] but it will complain in the derived
>> class, which typically doesn't even define a destructor explicitly.
> On the other hand, once one
> has paid the cost of making a class polymorphic anyway, is there really much
> (if any?) benefit to making its destructor non-virtual?

Q: Who would want to know that boost::exception_ptr's destructor is not virtual?

A: Only someone who wants to build a polymorphic type hierarchy with
boost::exception_ptr as a base, calling delete through a
boost::exception_ptr base pointer.

So, exception_ptr's destructor should be virtual to keep *that* guy
out of trouble?

Emil Dotchevski
Reverge Studios, Inc.

Boost list run by bdawes at, gregod at, cpdaniel at, john at