Re: [Boost-users] [msm] EUML in a header file

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.
I forgot why I need this, to be frank, I need to have a look at it.
Also, the addition of "= instance_name ## _helper();" makes the macros unusable in class definitions since instance_name is not static.
Ouch. How could I miss that one? This leaves me with as only choice your first solution with static and extra macros for the name. Thanks, Christophe
participants (1)
-
Christophe Henry