Boost logo

Boost :

Subject: Re: [boost] [modularization] Dependency to Boost.Exceptionunavoidable?
From: Daniel Pfeifer (daniel_at_[hidden])
Date: 2013-11-01 18:27:09

2013/11/1 Peter Dimov <lists_at_[hidden]>:
> Daniel Pfeifer wrote:
>> Moving throw_exception.hpp out of this repository eliminates that
>> dependency.
> I really don't see how.
> Before, you have my_module -> exception. After, you have my_module ->
> utility -> exception. Not only do you still depend on Exception, you now
> depend on Utility as well.

When I want to use exceptions and also Boost.Exception, I have my_app
-> exception in addition to my_app -> your_library -> utility ->
exception. The dependency to exception does not bother me. I have that

When I don't want to use Boost.Exception (BOOST_EXCEPTION_DISABLE), or
don't want to use exceptions at all (BOOST_NO_EXCEPTIONS), I have
my_app -> your_library -> utility. It should stop there.

>> Also, that header should not include any headers from Boost.Exception when
> Are you talking about
> #include <boost/exception/detail/attribute_noreturn.hpp>
> here?

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.

-- Daniel

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