
"Emil Dotchevski" <emil@revergestudios.com> wrote in message news:AANLkTi=5z+8LYDTAPLSaivGRsvGX0BoOw0bhpFrzoYCX@mail.gmail.com...
On Mon, Oct 11, 2010 at 7:43 AM, Domagoj Saric <domagoj.saric@littleendian.com> 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.
Of course there is, as I've shown performance difference results (repeated link http://lists.boost.org/Archives/boost/2010/01/160908.php) that also include data for the case when the 'way around' is turned on... The way around, as David has hinted, is the decoration of the pointer itself or the operator() (MSVC++ __declspec( nothrow ), GCC __attribute__(( nothrow )), c++1x noexcept, non-standard/'optimized' throw()...)... -- "What Huxley teaches is that in the age of advanced technology, spiritual devastation is more likely to come from an enemy with a smiling face than from one whose countenance exudes suspicion and hate." Neil Postman