
On Mon, 04 Nov 2013 14:08:01 +0100, rahul baruah
I am using boost::statechart. Instead of simple_state , using boost:: statechart::state. Now i am able to access the state_machine member variable. but when i am using custom::reaction or mpl::list it throught error. Code Snippet:
struct NotReady : StateBase< NotReady, TopState > { //typedef NotReadyStateList reactions; NotReady (my_context ctx) : my_base( ctx ){ outermost_context().maxPairedDevices = 3; cout << outermost_context().maxPairedDevices << endl; }
template< class MostDerived > sc::result react( const PairingBaseEvents< MostDerived > & ); public: typedef sc::custom_reaction< StartEvent > reactions; };
Error: ndefined reference to `boost::statechart::detail::safe_reaction_result NotReady::react<StartEvent>(PairingBaseEvents<StartEvent> const&)'
As it seems your compiler cannot match your react() signature against an expected one. Without complete compiling example it is hard to predict why. Regards, Slava