diff --git a/include/boost/sml.hpp b/include/boost/sml.hpp index 948b6083..cdec5f55 100644 --- a/include/boost/sml.hpp +++ b/include/boost/sml.hpp @@ -1703,6 +1703,23 @@ class sm { }); return result; } + template , class TState> + bool is_one_of_current_states_as(const TState&) const { + using type = typename T::type; + using sm_impl_t = sm_impl>; + using state_t = typename sm_impl_t::state_t; + using states_ids_t = typename sm_impl_t::states_ids_t; + auto result = false; + visit_current_states([&](auto state) { + (void)state; + if ((aux::get_id((states_ids_t *)0) == + aux::get_id((states_ids_t *)0))) { + result = true; + return; + } + }); + return result; + } template , class... TStates, __BOOST_SML_REQUIRES(!aux::is_same::value && aux::always::value)> void set_current_states(const TStates &...) {