We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple deferrals in a row should all be handled.
Only the first deferral triggers.
#include <cstdio> #include <cassert> #include <deque> #include <boost/sml.hpp> namespace sml = boost::sml; struct sm_logger { template <class SM, class TEvent> void log_process_event(const TEvent&) { printf("[%s][process_event] %s\n", sml::aux::get_type_name<SM>(), sml::aux::get_type_name<TEvent>()); } template <class SM, class TSrcState, class TDstState> void log_state_change(const TSrcState& src, const TDstState& dst) { printf("[%s][transition] %s -> %s\n", sml::aux::get_type_name<SM>(), src.c_str(), dst.c_str()); } }; struct e1 {}; struct defer_chain { auto operator()() const noexcept { using namespace sml; return make_transition_table( * "s0"_s + event<e1> / defer = "s1"_s , "s1"_s + event<e1> / defer = "s2"_s , "s2"_s + event<e1> / defer = "s3"_s , "s3"_s + event<e1> = X ); } }; int main() { using namespace sml; sm_logger logger; sml::sm<defer_chain, sml::defer_queue<std::deque> , sml::logger<sm_logger> > sm{logger}; sm.process_event(e1{}); }
https://godbolt.org/z/o39z4sMje
defer
The text was updated successfully, but these errors were encountered:
Now everything is working fine. And there was a merge. Here is the answer from this https://godbolt.org/z/o39z4sMje:
ASM generation compiler returned: 0 Execution build compiler returned: 0 Program returned: 0 [defer_chain][process_event] boost::sml::back::on_entry<boost::sml::back::_, boost::sml::back::initial> [defer_chain][process_event] e1 [defer_chain][transition] s0 -> s1 [defer_chain][process_event] e1 [defer_chain][transition] s1 -> s2 [defer_chain][process_event] e1 [defer_chain][transition] s2 -> s3 [defer_chain][process_event] e1 [defer_chain][transition] s3 -> terminate
Should we close it?
Sorry, something went wrong.
No branches or pull requests
Expected Behavior
Multiple deferrals in a row should all be handled.
Actual Behavior
Only the first deferral triggers.
Steps to Reproduce the Problem
https://godbolt.org/z/o39z4sMje
Specifications
defer
The text was updated successfully, but these errors were encountered: