
Gregory Colvin <gregory.colvin@oracle.com> writes:
On May 26, 2004, at 4:30 PM, David Abrahams wrote:
"Andreas Huber" <ah2003@gmx.net> 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 http://www.boost-consulting.com