
Hi,
having tested Boost.MSM, I'm pretty happy with it.
:)
It's interesting, in that it seems to handle all states in a static table. No "new" operator etc.
It's much faster without dynamic allocation. <snip> g_row<StateInitial, EventT, StateEven, &Machine_<EventT>::guardToEven>,
Unfortunately gcc gives this error: d.cpp:119:5: error: ‘g_row’ was not declared in this scope g_row<StateInitial, EventT, StateEven, &Machine_<EventT>::guardToEven>,
Short answer. Try: typename Machine_<EventT>::template g_row<StateFloat, EventT, StateFloat, &Machine_<EventT>::guardToFloat> Long answer: g_row is a type of state_machine_def and as your fsm is a template, it becomes a dependent type (=> typename) and a template one even (=> template). C++ is sometimes really annoying :( Longer answer. Give up this front-end, it's deprecated anyway. A better solution will be: #include <boost/msm/front/functor_row.hpp> using namespace boost::msm::front; struct GuardToOdd { template <class EVT,class FSM,class SourceState,class TargetState> bool operator()(EVT const& num,FSM& ,SourceState& ,TargetState& ) { const long long x = static_cast<long long>(num.getNum()); return ((x == num.getNum()) // is Integral type && ((x % 2) != 0)); } }; Row< StateFloat, EventT, StateOdd, none, GuardToOdd> HTH, Christophe