|
Boost : |
Subject: Re: [boost] [inspect] exceptions (FW: [Boost-users] no exceptions)
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2011-03-25 22:33:55
On Fri, Mar 25, 2011 at 6:58 PM, Gruenke, Matt <mgruenke_at_[hidden]> wrote:
> On Fri 3/25/2011 8:51 PM, Emil Dotchevski wrote:
>
>> First, let's get on the same page about the nature of the cost of
>> BOOST_THROW_EXCEPTION:
>>
>> - It adds ~500 lines of C++ code, increasing your compile times.
>> Compare this to something as basic as boost/config.hpp, which
>> preprocesses to ~47000 lines on my system.
>
> What does that have to do with anything?
This has to do with effect of BOOST_THROW_EXCEPTION on the time it
takes to compile your program. I count that as cost.
>> Second, consider that this is only the default behavior. All this
>> functionality disappears if you #define BOOST_EXCEPTION_DISABLE.
>
> Huh? But that changes the behavior of the code, breaking it in places that depend on exceptions.
You seem to be confusing BOOST_NO_EXCEPTIONS with
BOOST_EXCEPTION_DISABLE. Both change the behavior of
BOOST_THROW_EXCEPTION:
- BOOST_NO_EXCEPTIONS makes it call a user-defined function instead of throwing
- BOOST_EXCEPTION_DISABLE turns it into a simple throw (e.g. no cost)
except if BOOST_NO_EXCEPTIONS is defined, which takes precedence.
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