Zero-cost exceptions aren’t actually zero cost--Raymond Chen
The devil is in the details.
Zero-cost exceptions aren’t actually zero cost
by Raymond Chen
From the article:
There are two common models for exception handling in C++. One is by updating some program state whenever there is a change to the list of things that need to be done when an exception occurs, say, because a new exception handler is in scope or has exited scope, or to add or remove a destructor from the list of things to execute during unwinding. Another model is to use metadata to describe what to do if an exception occurs. There is no explicit management of the state changes at runtime; instead, the exception machinery infers the state by looking at the program counter and consulting the metadata...