Subject: Re: [boost] [exception] virtual inheritance troubles
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2010-02-26 14:40:31
On Fri, Feb 26, 2010 at 10:41 AM, Peter Dimov <pdimov_at_[hidden]> wrote:
> Emil Dotchevski wrote:
>> On Fri, Feb 26, 2010 at 3:54 AM, Peter Dimov <pdimov_at_[hidden]>
>>> 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
> I think that this can only happen if a derived class somehow ends up with
> two runtime_error bases; this is unlikely.
It is less likely compared to std::exception, but it is still a
possibility and I don't see why it shouldn't be avoided if possible
(it isn't possible for std::exception in this case, but it is possible
Reverge Studios, Inc.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk