Boost logo

Boost :

From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2023-04-13 08:43:31


On 4/13/23 06:08, Darrell Wright via Boost wrote:
> One thing I learned in my own replacement is that exit_success is heavily penalized on MSVC, even when there is no possible exception, because of the call to uncaught_exceptions that isn’t optimized. It’s a good thing to document, if not already, as it is surprising.

Well, a certain amount of overhead is expected, since the added
condition is there and not likely to be optimized away. However, I would
expect uncaught_exceptions() to be cheap, as it should simply read an
integer from TLS. I wonder how std::uncaught_exceptions() compares to
our custom implementation in boost::core::uncaught_exceptions().
Perhaps, I should benchmark it.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk