In Boost.Statechart, what's the difference between state and simple_state?
问题 In implementing a state machine using Boost.Statechart, I came across a problem arising from attempting to access the outer context of a simple_state from its constructor. A comment in simple_state.hpp tells me: // This assert fails when an attempt is made to access an outer // context from a constructor of a state that is *not* a subtype of // state<>. To correct this, derive from state<> instead of // simple_state<>. Apart from apparently being able to access the outer context from its