Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-05-26 19:57:25

Gregory Colvin <gregory.colvin_at_[hidden]> writes:

> On May 26, 2004, at 4:30 PM, David Abrahams wrote:
>> "Andreas Huber" <ah2003_at_[hidden]> writes:
>>> To the contrary, I think I
>>> have almost proved in my discussion with Dave that exit actions
>>> must not
>>> fail
>> IIUC your almost-proof that they must not fail is based on the
>> assumption that they're done with destructors. That would be circular
>> reasoning.
> As I understood it, the argument was that to make it possible for entry
> actions to fail it must be impossible for exit actions to fail. So to
> me this design looks like "resource acquisition is initialization", but
> I might be missing something.

That argument was wrong AFAICT. Exits happen before entries, and you
can't undo an exit; that's status quo. If you get arrive at the point
where an entry is about to fail, then the preceding exit didn't fail,
so the possibility of a failing exit has no impact.

Dave Abrahams
Boost Consulting

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