
On Thu, Nov 5, 2009 at 3:46 PM, Kim Barrett <kab.conundrums@verizon.net> 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@verizon.net> wrote:
- non-virtual-dtor on GCC contradicts a valid design choice. At least in recent versions of gcc, this warning is not generated when
On Nov 5, 2009, at 2:04 PM, Emil Dotchevski wrote: 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. http://www.revergestudios.com/reblog/index.php?n=ReCode