Back to 2014-proposals
Title: All About Exceptions
Proposer: Frank Birbacher
Type: Preconference Workshop
Duration: 360 mins
Description:
The tutorial will deal with all of the aspects of C++ exceptions. It will cover syntax and semantics of the built-in keywords, the meaning and use of the library support functions and classes, and the craft of using these tools to build exception safe code with the basic, strong and nofail exception safety guarantees in mind. Topics are:
- - syntax of throw, throw as an expression, throw in constexpr
- - syntax of try-catch, function-try-block and constructors
- - semantics of throw and stack unwinding
- - semantics of catch by value/reference
- - uncaught exceptions and program abortion
- - lifetime and storage of an exception object
- - syntax of function throw specifiers
- - semantics of function throw specifiers and related handlers
- - the downside of using throw specifiers
- - syntax of noexcept specifier and operator
- - difference between throw() and noexcept
- - semantics of throwing from constructors and destructors
- - meaning of std::uncaught_exception
- - std exception classes and functions which throw those, regarding <stdexcept> and <system_error>
- - meaning of std functions that throw in case they throw, leads to exception safety guarantees
- - basic, strong and nofail exception safety guarantees (Abrahams)
- - typical nofail operations in STL and the std::swap pitfall
- - typical strong operations in STL
- - canonical implementation of copy/move constructor and copy/move assignment for a value-like class type
- - keeping and passing exceptions around: std::exception_ptr
- - using exception_ptr to track origin: std::nested_exception
- - use of exception_ptr in std::promise/std::future