Skip to content

Commit

Permalink
Improved possibility to test current state in orthogonal state machines
Browse files Browse the repository at this point in the history
  • Loading branch information
pborzecki committed Jun 30, 2020
1 parent d3fa5b3 commit 462fbf7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/boost/sml.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1709,13 +1709,13 @@ class sm {
using sm_impl_t = sm_impl<typename TSM::template rebind<type>>;
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<T>([&](auto state) {
(void)state;
result |= (aux::get_id<state_t, typename TState::type>((states_ids_t *)0) ==
aux::get_id<state_t, typename decltype(state)::type>((states_ids_t *)0));
if ((aux::get_id<state_t, typename TState::type>((states_ids_t *)0) ==
aux::get_id<state_t, typename decltype(state)::type>((states_ids_t *)0)))
return true;
});
return result;
return false;
}
template <class T = aux::identity<sm_t>, class... TStates,
__BOOST_SML_REQUIRES(!aux::is_same<no_policy, typename TSM::testing_policy>::value && aux::always<T>::value)>
Expand Down

0 comments on commit 462fbf7

Please sign in to comment.