Boost logo

Boost :

Subject: Re: [boost] Boost and exceptions
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2012-06-24 01:56:58


On Sat, Jun 23, 2012 at 3:29 PM, Robert Ramey <ramey_at_[hidden]> wrote:

> Emil Dotchevski wrote:
> > There were a few examples of libraries emitting exceptions that did
> > not derive from std::exception in violation of a
> > boost::throw_exception requirement.
>
> The original boost::throw_exception or the current one?
>

The original one, which unfortunately did not enforce the requirement. The
current one does.

> This requirement was not enforced prior to Boost version 1.36. With
> > the introduction of Boost Exception, we got compile errors in the
> > offending libraries.
>
> Does this mean that if some user/library uses exceptions which don't
> derive from std::exception he can't use the boost exception library?
>

It means that if some Boost library ever passed to boost::throw_exception
an object of type that doesn't derive from std::exception, it'll lead to
compile errors under BOOST_NO_EXCEPTIONS. I'll let you figure out why.

Currently, you'll get a compile error in any configuration.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk