diff --git a/include/boost/sml.hpp b/include/boost/sml.hpp index 741effd8..622d7dfa 100644 --- a/include/boost/sml.hpp +++ b/include/boost/sml.hpp @@ -2280,13 +2280,9 @@ struct sm_impl : aux::conditional_t &states, aux::index_sequence) { auto handled = false; -#if defined(__cpp_fold_expressions) - ((handled |= dispatch_t::template dispatch<0, TMappings>(*this, current_state_[Ns], event, d, subs, states)), ...); -#else - (void)aux::swallow{ - 0, - (handled |= dispatch_t::template dispatch<0, TMappings>(*this, current_state_[Ns], event, d, subs, states), 0)...}; -#endif + for (auto i = 0u; i < sizeof...(Ns); ++i) { + handled |= dispatch_t::template dispatch<0, TMappings>(*this, current_state_[i], event, d, subs, states); + } return handled; } template