####################################
template<typename FrontMachine>
struct extended_back_machine : public boost::msm::back::state_machine<FrontMachine>
{
void test()
{
std::cout << "test" << std::endl;
}
};
struct fsm_ : public boost::msm::front::state_machine_def<fsm_>
{
struct State : public boost::msm::front::state<>
{
template <class Event,class FSM>
void on_entry(Event const&, FSM& fsm)
{
fsm.test();
}
};
typedef State initial_state;
};
int main()
{
typedef extended_back_machine<fsm_> fsm;
fsm m;
m.start();
return 0;
}
####################################