
On Wed, Oct 13, 2010 at 9:41 AM, Daniel Walker <daniel.j.walker@gmail.com> wrote:
In "promoting" function pointers to function objects, boost::function must transfer the call precondition from function pointers. To do this in an exception safe way, it must check whether the call precondition is met, otherwise it cannot offer a strong exception safety guarantee during the execution of boost::function::operator().
What Peter said: your terminology is wrong. Operator() of boost::function has basic (not strong) exception safety guarantee and this is true regardless of whether it wraps a function pointer or another callable object. Basic exception safety guarantee means that *if* an exception is emitted as a result of calling boost::function::operator(), the state of the program may be altered but no resources will leak. Whether or not an exception is emitted has nothing to do with exception safety. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode