Skip to content
New issue

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

Template error when using unused event in sml::back::process<> in action. #580

Open
martinerk0 opened this issue Jun 7, 2023 · 0 comments

Comments

@martinerk0
Copy link

When using sml::back::process<> process_event with event that is not previously used in the table:

Example from this issue with added nani event.

return make_transition_table(
      *"established"_s + event<release>          / send_fin  = "fin wait 1"_s,
      //  "fin wait 1"_s  + event<ack> [ is_valid ]  / &tcp_release::member_action    = "fin wait 2"_s,
      "fin wait 1"_s  + event<ack> [ is_valid ]  / []() {&tcp_release::member_action;}    = "fin wait 2"_s,
       "fin wait 2"_s  + event<fin> [ is_valid ] / send_ack  = "timed wait"_s,
      //  "fin wait 2"_s  + event<nani> [ is_valid ] / send_ack  = "timed waitt"_s, // won't compile
       "s1"_s + event<ack> / [this](sml::back::process<fin,nani> process_event) {
            calls += "a1.begin|";
            process_event(ack{});
            process_event(fin{});
            calls += "a1.end|";
          }   = "fin wait 2"_s,
       "timed wait"_s  + event<timeout>                      = X
    );

Expected Behavior

Maybe update documentation that you have to use events in table before you use it in action.

Actual Behavior

compile error with template argument deduction/substitution failed:

Specifications

  • Version: v1.1.8
  • Platform: Ubuntu 18.04
@martinerk0 martinerk0 changed the title Template error when using unused event in sml::back::process<> in action. Template error when using unused event in sml::back::process<> in action. Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant