sml
sml copied to clipboard
Substate instantiation issues in gcc/clang
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
- 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:
should this requirement be in the docs? @kris-jusiak