3 ms·
C++: The Obvious Final Step
- codewiz 3y ago> Since C++11 destructors are implicitly declared noexcept. Because of this change, libraries that used to employ destructors for the obvious final step suddenly broke in C++11. [...] > This is why std::uncaught_exception() has been removed from C++20 and instead, since C++17, we have std::uncaught_exceptions() (plural form) which gives you the number of uncaught exceptions in a given thread. [...] > And this solution works in C++17. But it no longer works in C++20, because now we have coroutines. But I'm sure C++23 will fix exceptions for good. No? Wait, maybe C++26 will...