dwxw
dwxw

Reputation: 1099

Boost MSM Pseudo Exit States

I'm creating a Boost MSM state machine where a few of the states have their own sub state machine. I created an orthogonal region, as per the Boost examples which allows an Error event to be posted from anywhere to terminate the state machine.

This worked well until I tried to post an Error event from one of my sub state machines. Nothing happened, and it seemed I need to use a Pseudo Exit state to forward an Error event to the parent state machine. This worked initially, but as I added more Pseudo Exit States to handle errors from each sub state machine, after a while a compiler error happens. Can't pin it down either, can have 1 or 2 Pseudo Exit States but eventually it just breaks. I have no more that 7 transitions in each sub state machine, and 9 in the parent. Each sub state machine contains 2 or 3 sub states and the parent has 6.

Does anyone know why this might happen? I have tried swapping transitions around and it appears to be no specific entry that is wrong. Can't see why there could be a conflict because the state names are scoped by the parent class. Is it because you should only have one Pseudo Exit even though I have different events triggering it? Or is it just my compiler?

Here is the error:

error C2664: 'boost::mpl::assertion_failed' : cannot convert parameter 1 from 'boost::mpl::failed ************(__thiscall boost::mpl::push_front_impl<Tag>::apply<Sequence,T>::REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST::* ***********)(Sequence)' to 'boost::mpl::assert<false>::type'

Any ideas? Thanks.

Upvotes: 1

Views: 440

Answers (1)

sumomoneko
sumomoneko

Reputation: 48

Have you tried to define BOOST_MPL_LIMIT_VECTOR_SIZE?

http://www.boost.org/doc/libs/1_54_0/libs/msm/doc/HTML/ch05.html

Upvotes: 0

Related Questions