Christophe Henry writes:
Christophe Henry writes:
You can also provide your own instances inside a front-end definition,
thus eliminating the problem completely, as in:
http://www.boost.org/doc/libs/1_46_0/libs/msm/doc/HTML/examples/SimpleTutori...
A couple more questions. I think you may be missing some more const specifiers in the trunk code. In common.hpp for instance, I think the following
#define BOOST_MSM_EUML_EVENT(instance_name) \
struct instance_name ## _helper : msm::front::euml::euml_event{ \
instance_name ## _helper(){} \
instance_name ## _helper const& operator()(){return *this;} }; \
instance_name ## _helper const instance_name = instance_name ## _helper();
should be
#define BOOST_MSM_EUML_EVENT(instance_name) \
struct instance_name ## _helper : msm::front::euml::euml_event{ \
instance_name ## _helper(){} \
instance_name ## _helper const& operator()() const {return *this;} }; \
instance_name ## _helper const instance_name = instance_name ## _helper();
If the operator() is not const then it can't be called on the defined instance.
Also, the addition of "= instance_name ## _helper();" makes the macros unusable in class definitions since instance_name is not static.