Boost logo

Boost :

From: David Bergman (davidb_at_[hidden])
Date: 2002-11-20 20:26:56


Just curious: do you mean "iff" ("if and only if") by your "IIF", or a
pure emphasized "if" (i.e. "IF")? Just in order for me to follow the
logic in the statements.


-----Original Message-----
From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of Fernando Cacciola
Sent: Wednesday, November 20, 2002 5:32 PM
To: Boost mailing list
Subject: Re: [boost] Do we need a boost_exception class or idiom?

----- Original Message -----
From: "David Abrahams" <dave_at_[hidden]>
To: "Boost mailing list" <boost_at_[hidden]>
Sent: Wednesday, November 20, 2002 6:40 PM
Subject: Re: [boost] Do we need a boost_exception class or idiom?

> "Fernando Cacciola" <fernando_cacciola_at_[hidden]> writes:
> > I'm not sure if a boost exception class is *needed*, but I see no
problem in
> > having one.
> > Anyway, IIF such an exception class is defined, I *strongly*
(as I
> > did in the past) that it provides:
> >
> > virtual void raise() const
> > {
> > throw *this ;
> > #endif
> > }
> >
> > and that boost libraries throw such exceptions *only* by calling
> > i.e. never with a throw expression directly in the user code.
> 1. Why should this be a virtual function? The dynamic type of an
> exception object is never used in a throw expression.
Just to avoid visivility issues with redefinitions in derived types (to
avoid the compiler telling that 'raise' hides definition on the base

> 2. Why are we reinventing the wheel? What's wrong with
> boost::throw_exception() from boost/throw_exception.hpp?
Nothing :-)
I like this approach... and I had forgot about it.
Anyway, I was just pointing out that IIF a boost exception class was
it should throw itself.

Fernando Cacciola

Unsubscribe & other changes:

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