<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>I tried to enhance the backend of boost::msm by inheriting from boost::msm::back::state_machine.<br></div>When doing so, I cannot access members of my subclass in the states.<br><br></div><div>When compiling the attached example, I get this error message:<br><br><b>error: ‘class boost::msm::back::state_machine<fsm_, boost::parameter::void_, boost::parameter::void_, boost::parameter::void_, boost::parameter::void_>’ has no member named ‘test’</b><br></div><br></div>How can I "inject" extended_back_machine as the type being passed as "FSM" to the state?<br><br></div>Bye<br>Manuel<br><div><div><br>####################################<br><br>template<typename FrontMachine><br>struct extended_back_machine : public boost::msm::back::state_machine<FrontMachine><br>{<br> void test()<br> {<br> std::cout << "test" << std::endl;<br> }<br>};<br><br><br>struct fsm_ : public boost::msm::front::state_machine_def<fsm_><br>{<br> struct State : public boost::msm::front::state<><br> {<br> template <class Event,class FSM><br> void on_entry(Event const&, FSM& fsm)<br> {<br> fsm.test();<br> }<br> };<br> typedef State initial_state;<br>};<br><br><br>int main()<br>{<br> typedef extended_back_machine<fsm_> fsm;<br> fsm m;<br> m.start();<br> return 0;<br>}<br><div><br>####################################</div></div></div></div>