
David Abrahams wrote:
"Alexander Nasonov" <alnsn@yandex.ru> writes:
struct Running { /* stateful */ }; struct Stopped { /* stateful */ };
Even more confusing; now you need a dynamic allocation Why I need it?
to represent and change the current state of the machine. I suppose you could use variant, That's one possible representation
but I never understood why people want to put state _inside_ of states -- it doesn't match up with the domain abstraction of state machines. The state's identity should be enough.
There are two kinds of state: state of machine and class state. They're from different domains. Suppose Running state has m_speed member. Is it worth adding this member to the state identity? PS: We are ahead of time, boost::fsm review is scheduled on Feb 21 :) -- Alexander