Boost logo

Boost :

Subject: Re: [boost] [function] function wrapping with no exceptionsafetyguarantee
From: Emil Dotchevski (emil_at_[hidden])
Date: 2010-10-11 13:21:10


On Mon, Oct 11, 2010 at 7:43 AM, Domagoj Saric
<domagoj.saric_at_[hidden]> wrote:
> However this still does nothing concerning the exceptions vs no-exceptions
> comparison/debate because the compiler still has to treat
> function<>::operator() as a possibly throwing function (and add/generate
> appropriate EH code in/for the callers) because it makes an indirect call
> through a (undecorated) pointer...

If you don't disable exception handling, the compiler must treat the
dynamic call in boost::function as potentially throwing. There is no
way around that.

(If you do disable exception handling, boost::function already does
not throw. It still depends on Boost Exception, but only because that
is where the common workarounds for dealing with BOOST_NO_EXCEPTIONS
live; that is, BOOST_NO_EXCEPTIONS is a valid configuration for the
Boost Exception library.)

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