Boost logo

Boost Users :

Subject: Re: [Boost-users] [Exceptions] Boost exception relationship with std exception & streams
From: Emil Dotchevski (emil_at_[hidden])
Date: 2010-06-22 13:40:02


On Tue, Jun 22, 2010 at 1:41 AM, joel falcou <joel.falcou_at_[hidden]> wrote:
> Emil Dotchevski wrote:
>>
>> You can define BOOST_EXCEPTION_DISABLE, which disables the Boost
>> Exception library itself, leaving the legacy boost::throw_exception
>> behavior (which still has two flavors, depending on
>> BOOST_NO_EXCEPTIONS). In this configuration no STL components are used
>> except for std::exception. You can then #ifdef your code that uses the
>> Boost Exception library with BOOST_EXCEPTION_DISABLE.
>>
>
> Ok, so I can say that if NT2_CONFIG_NO_STREAMS is set, I set
> BOOST_EXCEPTION_DISABLE
> and no stream header will be included basically ?.

In terms of what headers are included by boost/throw_exception.hpp,
the only difference BOOST_EXCEPTION_DISABLE makes is that it prevents
boost/exception/exception.hpp and boost/current_function.hpp from
being included, however these headers don't include anything and are
*very* lightweight.

With or without BOOST_EXCEPTION_DISABLE boost/throw_exception.hpp includes:

#include <boost/exception/detail/attribute_noreturn.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/config.hpp>
#include <exception>

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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net