Boost logo

Boost :

From: Emil Dotchevski (emil_at_[hidden])
Date: 2007-11-07 14:04:29

> > > Here is a generic exception_ptr implementation based on a registry
> of
> > > exception types. ( The registry
> is
> >
> > If boost::throw_exception is modified such that its postcondition is
> > that the exception object it throws derives from boost::exception (I
> > can't think of a reason not to), cloning can be implemented
> > intrusively without a need for registration.
> I would hope to save exceptions thrown from 3rd party libraries. An
> intrusive approach wouldn't work.

For boost::throw_exception to be able to register the exception type
from 3rd party libraries, they must call boost::throw_exception.

If they call boost::throw_exception then we have the concrete type
they wish to throw (as a template parameter) and we can wrap that type
in something else which implements the cloning. This would be very
similar to the current semantics of boost::enable_error_info (part of

Emil Dotchevski
Reverge Studios, Inc.

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