Boost logo

Boost :

Subject: Re: [boost] [modularization] Dependency to Boost.Exceptionunavoidable?
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2013-11-01 19:01:25


On Fri, Nov 1, 2013 at 3:27 PM, Daniel Pfeifer <daniel_at_[hidden]> wrote:
> I was referring to <boost/exception/exception.hpp>. This should not be
> needed when BOOST_NO_EXCEPTIONS is defined, as throw_exception takes
> std::exception, not boost::exception.

That is not necessarily true. These two defines have the following semantics:

1. If BOOST_NO_EXCEPTIONS is defined, libraries should not throw. One
option to implement that behavior is to pass exception objects (of the
usual documented library-defined types) to boost::throw_exception.
This imposes a requirement that the exception types must derive from
std::exception, but does NOT mean that they can't use the Boost
Exception library.

2. If BOOST_EXCEPTION_DISABLE is defined, then boost::throw_exception
does not inject the boost::exception class as a base. This prevents
boost/exception/exception.hpp from being included. However that header
does not include *any* headers, so the benefits in terms of
dependencies are mostly theoretical.

-- 
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