Boost logo

Boost :

Subject: Re: [boost] [exception] virtual inheritance troubles
From: Peter Dimov (pdimov_at_[hidden])
Date: 2010-02-26 13:41:28

Emil Dotchevski wrote:
> On Fri, Feb 26, 2010 at 3:54 AM, Peter Dimov <pdimov_at_[hidden]>
> wrote:
>> Eric Niebler wrote:
>>> struct regex_error
>>>> virtual std::runtime_error
>>> , virtual boost::exception
>> There is no need to derive virtually from runtime_error. As you say
>> below, this serves no purpose.
> The purpose it serves is that someone catching std::runtime_error
> won't get silent errors, even though there is still a problem with
> std::exception.

I think that this can only happen if a derived class somehow ends up with
two runtime_error bases; this is unlikely. Two std::exception bases, or two
boost::exception bases, can occur, but the virtual inheritance from
runtime_error cannot help.

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