Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-07-30 09:12:04

Hi Daryle,

I just noticed this in the docs for i/o state savers:

  1.. When a new success state is activated for exception watching, an
exception is thrown if that state is already active. This could mean that
the destructor of this class template may throw.

What steps does the class take to prevent termination during exception
unwinding? If none, I think it's unacceptable. If it does take steps, they
need to be spelled out; the statement above is too alarming by itself.

Also, I wonder about the potential for throwing an exception when stream
state is restored in general. If an i/o operation fails, and the saver
resets the stream state while it is being destroyed, can that operation
fail? If it fails, what happens?


P.S. I'm trying to bone up on all the libraries for a class I'm going to
teach on Boost. I didn't really take much notice of this one, but I'm
really glad we have it since sticky states have always made me nervous.

           David Abrahams * Boost Consulting
dave_at_[hidden] *

Boost list run by bdawes at, gregod at, cpdaniel at, john at