Detects if the current thread has a live exception object, that is, an exception has been thrown and not yet entered a matching catch clause, std::terminate or std::unexpected. In other words, std::uncaught_exception detects if stack unwinding is currently in progress.

The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.

Sometimes it's safe to throw an exception even while std::uncaught_exception()==true. For example, if exceptions are caught and ignored in a destructor, they can't propagate out of it and won't lead to std::terminate.

The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.