
Hi, I want to forward declare a state machine which has a non-default constructor. I found this example here: http://stackoverflow.com/a/10922799/678093 But I can't call the non-default constructor of the state machine. I either get - "error: call of overloaded ‘fsm(int)’ is ambiguous" (if inheriting constructors using C++11) or - "error: no matching function for call to ‘wrapper::fsm::fsm(int)" What can I do about it? Thanks, Manuel Example: ------------------------ // wrapper.h #include <boost/msm/front/state_machine_def.hpp> #include <boost/msm/back/state_machine.hpp> #include <boost/shared_ptr.hpp> class wrapper { wrapper(); struct fsm; boost::shared_ptr<fsm> player_fsm; }; ------------------------ // wrapper.cpp #include "wrapper.h" struct player_ : public boost::msm::front::state_machine_def<player_> { player_(int some_value) {} }; struct wrapper::fsm : public boost::msm::back::state_machine<player_> { using boost::msm::back::state_machine<player_>::state_machine; }; wrapper::wrapper() : player_fsm(new fsm(100)) { } ------------------------