Writing “Exception Safe” C++

18/09/99


Click here to start


Table of Contents

Writing “Exception Safe” C++

Overview

Timeline

Some of the articles

Writing “Exception Safe” C++

Call stack: a() to x()

f() is exception safe if...

Divide and conquer

Other definitions

Recap: “exception safety”

Writing “Exception Safe” C++

How do we write f()?

PPT Slide

Assignment operator

The naïve approach

naïve approach - assessment

Writing “Exception Safe” C++

The guidelines

The revised example

revised assignment operator

assignment operator - again

Recap: the guidelines

Writing “Exception Safe” C++

A smart pointer

Another version of Whole

The latest implementation

Specialising std::swap

Base classes

Extended Whole

PPT Slide

ExtendedWhole::swap()

ExtendedWhole::setParts()

ExtendedWhole::setParts()

“Strong” or “Weak” guarantee?

Writing “Exception Safe” C++

PPT Slide

Example for discussion

PPT Slide

Author: Alan Griffiths

Email: alan.griffiths@experian.com

Home Page: http://www.octopull.demon.co.uk

Download presentation source