Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2002-08-04 01:44:19

on 8/2/02 3:14 PM, Thomas Witt at witt_at_[hidden] wrote:

> On Thursday 01 August 2002 15:52, David Abrahams wrote:
>> From: "Daryle Walker" <darylew_at_[hidden]>
[response left out]
>> IMO this response is much too vague to be appropriate for Boost. You should
>> be sure about what the standard says on stream state re-setting, and you
>> should understand what the standard says about uncaught_exception() to see
>> if its use is appropriate here rather than appealing to what "many don't
>> think" about its usefulness.
> I have to agree with dave here. Though I see the point that support for
> std::uncaught_exception is patchy.
> That said I do think that io-state saver needs a serious rework regarding
> exception safety. From first analysis there are actually three saver types
> where the destructor can throw, state, exception and rdbuf. Only one of them
> is documented as such. With rdbuf being the most esoteric in my opinion (It
> may throws if rdbuf restores a null pointer). On second thought even locale
> may throw if registered callbacks throw, but I am not sure about this one.

I adding a change to the docs explaining that both the failure-state and
exception-state savers can throw on destruction (due to the way the
accessors they use interact). I looked at the Standard, and I don't think
passing "rdbuf" a NULL pointer doesn't cause a throw. However, the
failure-state method "clear" adds the "bad" state to whatever input state it
gets if rdbuf is NULL. If you have a NULL rdbuf, then I think you didn't
initialize your stream correctly, and I'm not taking responsibility for that
bad (pardon the pun) behavior.

Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com

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