Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4720: [function][patch] function wrapper with no exception safety guarantee
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-10-08 08:14:24
#4720: [function][patch] function wrapper with no exception safety guarantee
-------------------------------+--------------------------------------------
Reporter: djwalker | Owner: dgregor
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: function
Version: Boost 1.44.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+--------------------------------------------
Comment (by peter.myerscough-jackopson@â¦):
I like the concept of an entirely separate ''unsafe_function'', but I am
also aware that the patch of #4646 would also enable benefits when the
normal function object is used, for example a common idiom of using
function objects is
{{{
if( funcObj )
{
funcObj(); // could be funcObj->unchecked_invoke();
}
}}}
which would benefit from being an unchecked_invoke(), but I suppose that
it may be simpler / cleaner to maintain the calling operator and allow an
optimizer to remove the repeated checking of the funcObj's validity, but
this does rely on the optimiser, which both gcc and msvc++ do.
I think it would be worth placing some boost assertions in place of the
previous checks so that debug code will catch and highlight the failure
point.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4720#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC