id summary reporter owner description type status milestone component version severity resolution keywords cc 10722 msm gives compilation errors when using state machine constructors with arguments Marek Glos Christophe Henry "This code compiles fine with boost 1.55.0 but fails on 1.56.0. Checked on MSVC2012 and gcc. {{{ #include // back-end #include #include // front-end #include #include namespace msm = boost::msm; namespace mpl = boost::mpl; using namespace msm::front; struct Substate : public msm::front::state<> { }; struct State_ : public msm::front::state_machine_def { State_(int) {} State_() {} struct transition_table : mpl::vector< // Start Event Next Action Guard // +------------+-------------+------------+-----------+------------+ Row < Substate , none , none , none , none > > {}; typedef Substate initial_state; }; typedef msm::back::state_machine State; // machine itself struct TestFSM_ : public msm::front::state_machine_def { TestFSM_(int) {} TestFSM_() {} struct transition_table : mpl::vector< // Start Event Next Action Guard // +------------+--------------+------------+-----------+-----------+ Row < State , none , none , none , none > > {}; typedef State initial_state; }; typedef msm::back::state_machine TestFSM; void start() { TestFSM(msm::back::states_ << State(10), 10); } }}} Error output from MSVC2012 looks like this: {{{ 1> test.cpp 1>c:\test\boost\boost\core\enable_if.hpp(36): error C2039: 'value' : is not a member of 'boost::is_convertible' 1> with 1> [ 1> From=boost::fusion::vector1>, 1> To=boost::msm::back::state_machine 1> ] 1> c:\test\boost\boost\type_traits\is_convertible.hpp(486) : see reference to class template instantiation 'boost::enable_if' being compiled 1> with 1> [ 1> Cond=boost::is_convertible>,boost::msm::back::state_machine>, 1> T=void 1> ] 1> c:\test\boost\boost\core\enable_if.hpp(59) : see reference to class template instantiation 'boost::is_convertible' being compiled 1> with 1> [ 1> From=boost::fusion::vector1>, 1> To=boost::msm::back::state_machine 1> ] 1> c:\test\boost\boost\fusion\container\vector\convert.hpp(46) : see reference to class template instantiation 'boost::disable_if' being compiled 1> with 1> [ 1> Cond=boost::is_convertible>,boost::msm::back::state_machine>, 1> T=void 1> ] 1> c:\test\boost\boost\msm\back\state_machine.hpp(1564) : see reference to function template instantiation 'boost::fusion::vector1 boost::fusion::as_vector>(const Sequence &)' being compiled 1> with 1> [ 1> T0=boost::msm::back::state_machine, 1> Car=boost::msm::back::state_machine, 1> Cdr=boost::fusion::nil_, 1> Sequence=boost::fusion::cons,boost::fusion::nil_> 1> ] 1> c:\test\boost\boost\msm\back\state_machine.hpp(1655) : see reference to function template instantiation 'void boost::msm::back::state_machine::set_states(const Expr &)' being compiled 1> with 1> [ 1> A0=TestFSM_, 1> Expr=boost::msm::msm_terminal &,boost::msm::msm_terminal &>,0>>>,2>> 1> ] 1> c:\test\boost\boost\msm\back\state_machine.hpp(1655) : see reference to function template instantiation 'void boost::msm::back::state_machine::set_states(const Expr &)' being compiled 1> with 1> [ 1> A0=TestFSM_, 1> Expr=boost::msm::msm_terminal &,boost::msm::msm_terminal &>,0>>>,2>> 1> ] 1> c:\test\ffc\audioextractor\dataanalyzer\engines\test.cpp(47) : see reference to function template instantiation 'boost::msm::back::state_machine::state_machine,int>(const boost::msm::msm_terminal &,ARG0,void *)' being compiled 1> with 1> [ 1> A0=TestFSM_, 1> Expr=boost::proto::exprns_::basic_expr &,boost::msm::msm_terminal &>,0>>>,2>, 1> ARG0=int 1> ] 1> c:\test\ffc\audioextractor\dataanalyzer\engines\test.cpp(47) : see reference to function template instantiation 'boost::msm::back::state_machine::state_machine,int>(const boost::msm::msm_terminal &,ARG0,void *)' being compiled 1> with 1> [ 1> A0=TestFSM_, 1> Expr=boost::proto::exprns_::basic_expr &,boost::msm::msm_terminal &>,0>>>,2>, 1> ARG0=int 1> ] 1>c:\test\boost\boost\core\enable_if.hpp(36): error C2065: 'value' : undeclared identifier 1>c:\test\boost\boost\core\enable_if.hpp(36): error C2975: 'B' : invalid template argument for 'boost::enable_if_c', expected compile-time constant expression 1> c:\test\boost\boost\core\enable_if.hpp(27) : see declaration of 'B' }}}" Bugs reopened msm Boost 1.57.0 Problem