sml icon indicating copy to clipboard operation
sml copied to clipboard

Substate instantiation issues in gcc/clang

Open tralamazza opened this issue 2 years ago • 1 comments

Expected Behavior

  • Composite state machines should not require a dummy member variable
  • Code compiles in both Gcc and Clang.

Actual Behavior

!Expected Behavior

Steps to Reproduce the Problem

  1. https://cpp.godbolt.org/z/MqW1dM6GM

[Line 42] There are 2 sub state machines, one Good another Bad. Good always works and the only difference between them is a member variable.

[Line 16] If Bad defines a default ctor then the error goes away (only in Clang).

[Line 31] If the guard in the Composite state machine uses a copy argument instead of a reference (const or not) then the error also disappears.

Specifications

  • Version: master
  • Platform: godbolt (linux)
  • Subsystem:

tralamazza avatar Mar 07 '22 10:03 tralamazza

should this requirement be in the docs? @kris-jusiak

tralamazza avatar Mar 22 '22 16:03 tralamazza