Writing “Exception Safe” C++
Overview
Timeline
Some of the articles
Call stack: a() to x()
f() is exception safe if...
Divide and conquer
Other definitions
Recap: “exception safety”
How do we write f()?
PPT Slide
Assignment operator
The naïve approach
naïve approach - assessment
The guidelines
The revised example
revised assignment operator
assignment operator - again
Recap: the guidelines
A smart pointer
Another version of Whole
The latest implementation
Specialising std::swap
Base classes
Extended Whole
ExtendedWhole::swap()
ExtendedWhole::setParts()
“Strong” or “Weak” guarantee?
Example for discussion
Email: alan.griffiths@experian.com
Home Page: http://www.octopull.demon.co.uk
Download presentation source