“The Exception Situation"
summary
C++ exceptions remain part of the language and are compared here against return codes, optionals and Go‑style pairs with concrete microbenchmarks across clang, MSVC and GCC; results show exceptions slower in microbenchmarks (special MSVC string case aside) and roughly a 3% code-size increase. Examples exercise recursive stack unwinding (depths to 10), RAII/unique_ptr to avoid leaks, and propose C++17 features (optional, structured bindings, expected) as practical alternatives. Catch only to clean up and rethrow is the recommended coding pattern.
AI-written summary · about
chapters (12)
- 0:00Introduction and speaker background
- 1:05Why exceptions need more love
- 5:01Basic exception handling example
- 8:59Alternatives to exceptions
- 17:48When to catch exceptions
- 22:54Exception safety in manual memory management
- 30:57Global cleanup and termination
- 34:30Error handling performance comparison
- 41:18Exception handling in real-world code
- 46:32Performance impact and embedded systems
- 51:30Where exceptions fit best
- 56:09Q&A session








