
----- Original Message ----- From: "Andreas Huber" <ah2003@gmx.net> To: <boost@lists.boost.org> Sent: Saturday, June 05, 2004 3:15 AM Subject: [boost] Re: Re: Re: [fsm] transition context and exit() [...]
I thought that in both cases it is guaranteed that the stack is unwound (when we enter the catch ( ... ) handler). If so, then the scope guard inside initiate() will destruct all state objects. Inside the catch (
... )
handler the machine object is therefore in a defined state (machine.terminated() returns true). I interpreted your earlier comments such that stack unwinding is not guaranteed *only* when we never catch the exception propagated out of the state_machine<>::initiate() function. As soon as the exception is caught somewhere the stack will unwind and the machine object is in a defined state when it is accessed.
What am I missing?
Nothing. I misunderstood you and thought that you meant the state_machine d'tor. If it is a scope guard in initiate() then you are right. Eugene