Skip to content

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

Open
@martinerk0

Description

@martinerk0

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions