From 0ed34d2c24135e6037695cd35eccfb06e24f2ef3 Mon Sep 17 00:00:00 2001 From: Christian Granzin Date: Fri, 19 Sep 2025 01:39:38 -0400 Subject: [PATCH 1/9] remove code related to euml and proto --- include/boost/msm/backmp11/state_machine.hpp | 135 ------------------- 1 file changed, 135 deletions(-) diff --git a/include/boost/msm/backmp11/state_machine.hpp b/include/boost/msm/backmp11/state_machine.hpp index 132c77dd..151f5054 100644 --- a/include/boost/msm/backmp11/state_machine.hpp +++ b/include/boost/msm/backmp11/state_machine.hpp @@ -57,7 +57,6 @@ #include #include -#include #include #include #include @@ -116,17 +115,6 @@ typedef ::boost::parameter::parameters< > > state_machine_signature; -// just here to disable use of proto when not needed -template -struct make_euml_terminal; -template -struct make_euml_terminal >::type> -{}; -template -struct make_euml_terminal >::type> - : public proto::extends::type, T, boost::msm::state_domain> -{}; - // library-containing class for state machines. Pass the actual FSM class as // the Concrete parameter. // A0=Derived,A1=NoHistory,A2=CompilePolicy,A3=FsmCheckPolicy > @@ -141,11 +129,6 @@ class state_machine : //public Derived public ::boost::parameter::binding< typename state_machine_signature::bind::type, tag::front_end >::type - , public make_euml_terminal, - typename ::boost::parameter::binding< - typename state_machine_signature::bind::type, tag::front_end - >::type - > { public: // Create ArgumentPack @@ -1691,124 +1674,6 @@ class state_machine : //public Derived fill_states(this); } - // Construct with the default initial states and some default argument(s) -#if defined (BOOST_NO_CXX11_RVALUE_REFERENCES) \ - || defined (BOOST_NO_CXX11_VARIADIC_TEMPLATES) \ - || defined (BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) - template - state_machine - (Expr const& expr, typename ::boost::enable_if::type >::type* = 0) - :Derived() - , m_events_queue() - , m_deferred_events_queue() - , m_history() - , m_event_processing(false) - , m_is_included(false) - , m_visitors() - , m_substate_list() - { - BOOST_MPL_ASSERT_MSG( - (::boost::proto::matches::value), - THE_STATES_EXPRESSION_PASSED_DOES_NOT_MATCH_GRAMMAR, - (FoldToList)); - - // initialize our list of states with the ones defined in Derived::initial_state - ::boost::mpl::for_each< seq_initial_states, ::boost::msm::wrap > - (init_states(m_states)); - m_history.set_initial_states(m_states); - // create states - set_states(expr); - fill_states(this); - } -#define MSM_CONSTRUCTOR_HELPER_EXECUTE_SUB(z, n, unused) ARG ## n t ## n -#define MSM_CONSTRUCTOR_HELPER_EXECUTE(z, n, unused) \ - template \ - state_machine(BOOST_PP_ENUM(n, MSM_CONSTRUCTOR_HELPER_EXECUTE_SUB, ~ ), \ - typename ::boost::disable_if::type >::type* =0 ) \ - :Derived(BOOST_PP_ENUM_PARAMS(n,t)) \ - ,m_events_queue() \ - ,m_deferred_events_queue() \ - ,m_history() \ - ,m_event_processing(false) \ - ,m_is_included(false) \ - ,m_visitors() \ - ,m_substate_list() \ - { \ - ::boost::mpl::for_each< seq_initial_states, ::boost::msm::wrap > \ - (init_states(m_states)); \ - m_history.set_initial_states(m_states); \ - fill_states(this); \ - } \ - template \ - state_machine(Expr const& expr,BOOST_PP_ENUM(n, MSM_CONSTRUCTOR_HELPER_EXECUTE_SUB, ~ ), \ - typename ::boost::enable_if::type >::type* =0 ) \ - :Derived(BOOST_PP_ENUM_PARAMS(n,t)) \ - ,m_events_queue() \ - ,m_deferred_events_queue() \ - ,m_history() \ - ,m_event_processing(false) \ - ,m_is_included(false) \ - ,m_visitors() \ - ,m_substate_list() \ - { \ - BOOST_MPL_ASSERT_MSG( \ - ( ::boost::proto::matches::value), \ - THE_STATES_EXPRESSION_PASSED_DOES_NOT_MATCH_GRAMMAR, \ - (FoldToList)); \ - ::boost::mpl::for_each< seq_initial_states, ::boost::msm::wrap > \ - (init_states(m_states)); \ - m_history.set_initial_states(m_states); \ - set_states(expr); \ - fill_states(this); \ - } - - BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(BOOST_MSM_CONSTRUCTOR_ARG_SIZE,1), MSM_CONSTRUCTOR_HELPER_EXECUTE, ~) -#undef MSM_CONSTRUCTOR_HELPER_EXECUTE -#undef MSM_CONSTRUCTOR_HELPER_EXECUTE_SUB - -#else - template ::type >::type> - state_machine(ARG0&& t0,ARG&&... t) - :Derived(std::forward(t0), std::forward(t)...) - ,m_events_queue() - ,m_deferred_events_queue() - ,m_history() - ,m_event_processing(false) - ,m_is_included(false) - ,m_visitors() - ,m_substate_list() - { - ::boost::mpl::for_each< seq_initial_states, ::boost::msm::wrap > - (init_states(m_states)); - m_history.set_initial_states(m_states); - fill_states(this); - } - template ::type >::type> - state_machine(Expr const& expr,ARG&&... t) - :Derived(std::forward(t)...) - ,m_events_queue() - ,m_deferred_events_queue() - ,m_history() - ,m_event_processing(false) - ,m_is_included(false) - ,m_visitors() - ,m_substate_list() - { - BOOST_MPL_ASSERT_MSG( - ( ::boost::proto::matches::value), - THE_STATES_EXPRESSION_PASSED_DOES_NOT_MATCH_GRAMMAR, - (FoldToList)); - ::boost::mpl::for_each< seq_initial_states, ::boost::msm::wrap > - (init_states(m_states)); - m_history.set_initial_states(m_states); - set_states(expr); - fill_states(this); - } -#endif - - // assignment operator using the copy policy to decide if non_copyable, shallow or deep copying is necessary library_sm& operator= (library_sm const& rhs) { From b32663e039a8892930ee9616261285b67f25c0b2 Mon Sep 17 00:00:00 2001 From: Christian Granzin Date: Fri, 19 Sep 2025 01:49:40 -0400 Subject: [PATCH 2/9] Remove other code related to proto --- include/boost/msm/backmp11/state_machine.hpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/include/boost/msm/backmp11/state_machine.hpp b/include/boost/msm/backmp11/state_machine.hpp index 151f5054..ff7e4ae0 100644 --- a/include/boost/msm/backmp11/state_machine.hpp +++ b/include/boost/msm/backmp11/state_machine.hpp @@ -58,7 +58,6 @@ #include #include #include -#include #include #include #include @@ -77,7 +76,6 @@ namespace boost { namespace msm { namespace backmp11 using back::no_fsm_check; using back::queue_container_deque; -using back::FoldToList; // event used internally for wrapping a direct entry @@ -1637,23 +1635,8 @@ class state_machine : //public Derived int* const m_initial_states; int m_index; }; + public: - struct update_state - { - update_state(substate_list& to_overwrite_):to_overwrite(&to_overwrite_){} - template - void operator()(StateType const& astate) const - { - std::get::value>(*to_overwrite)=astate; - } - substate_list* to_overwrite; - }; - template - void set_states(Expr const& expr) - { - ::boost::fusion::for_each( - ::boost::fusion::as_vector(FoldToList()(expr, boost::fusion::nil_())),update_state(this->m_substate_list)); - } // Construct with the default initial states state_machine() From 3e476ea6fe683673e78704de5c27c0ef60dad1ad Mon Sep 17 00:00:00 2001 From: Christian Granzin Date: Fri, 19 Sep 2025 02:02:40 -0400 Subject: [PATCH 3/9] exclude backmp11 from eUML tests --- test/AnonymousEuml.cpp | 4 +--- test/BackCommon.hpp | 6 ++++++ test/CompositeEuml.cpp | 6 +----- test/OrthogonalDeferredEuml.cpp | 9 +-------- test/SerializeSimpleEuml.cpp | 4 +--- test/SimpleEuml.cpp | 4 +--- test/SimpleEuml2.cpp | 4 +--- test/SimpleInternalEuml.cpp | 4 +--- 8 files changed, 13 insertions(+), 28 deletions(-) diff --git a/test/AnonymousEuml.cpp b/test/AnonymousEuml.cpp index cca60a74..240b025c 100644 --- a/test/AnonymousEuml.cpp +++ b/test/AnonymousEuml.cpp @@ -9,6 +9,7 @@ // http://www.boost.org/LICENSE_1_0.txt) // back-end +#define BOOST_MSM_TEST_EUML #include "BackCommon.hpp" #include @@ -163,6 +164,3 @@ namespace } } - -using backmp11_fsm = boost::msm::backmp11::state_machine; -BOOST_MSM_BACKMP11_GENERATE_DISPATCH_TABLE(backmp11_fsm); \ No newline at end of file diff --git a/test/BackCommon.hpp b/test/BackCommon.hpp index 482e4238..27044b7a 100644 --- a/test/BackCommon.hpp +++ b/test/BackCommon.hpp @@ -19,8 +19,11 @@ template using get_test_machines = boost::mpl::vector< boost::msm::back::state_machine, boost::msm::back::state_machine, +// EUML is not supported by backmp11. +#ifndef BOOST_MSM_TEST_EUML boost::msm::backmp11::state_machine, boost::msm::backmp11::state_machine, +#endif // BOOST_MSM_TEST_EUML boost::msm::back11::state_machine >; @@ -28,8 +31,11 @@ template