
On Mon, Sep 6, 2010 at 12:03 PM, Peter Myerscough-Jackopson <peter.myerscough-jackopson@macltd.com> wrote:
As others have noted, a common idiom for using a boost function object is to check if it is non-empty prior to calling it, is it an unreasonable extension to add this call? I am aware TR1 has subsumed “function” and so it is probably not possible remove the if-clause, but adding an unchecked invoke has significant benefits, [unchecked_invoke(), might be a better name than purely invoke()].
Another possible solution to this particular problem is to change the call to boost::throw_exception to BOOST_THROW_EXCEPTION (http://www.boost.org/doc/libs/release/libs/exception/doc/BOOST_THROW_EXCEPTI...) and then change boost/throw_exception.hpp to not define BOOST_THROW_EXCEPTION if it is already defined by the user. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode