KEYNOTE: De-fragmenting C++: Making Exceptions More Affordable and Usable

By Herb Sutter

Error handling has fractured the C++ community into incompatible dialects, because of long-standing unresolved problems in C++ exception handling. Many projects turn off exception handling (EH) entirely, such as with -fno- except. Many others don’t throw exceptions in code that has to run in statically bounded space or time. Still others don’t know exceptions in code that may not be exception-safe, because they cannot see the invisible exceptional control flow paths.

This talk summarizes the root causes and presents some early proposed solutions that we hope will let the community embrace using exceptions consistently for unified error handling. It also discusses the differences between program-recoverable errors (e.g., database connection dropped), program bugs (e.g., precondition violation), and exceeding resource limits (e.g., stack overflow) to demonstrate why these are three fundamentally different things with different audiences, and therefore should be reported in different ways. The talk will also cover what’s already going on in C++ standardization today to evolve the standard library in these directions, including what’s now already in C++20 to lay the groundwork for these coming changes.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.