boost-ext / sml

C++14 State Machine library
https://boost-ext.github.io/sml
Boost Software License 1.0
1.1k stars 173 forks source link

Cannot get access to state objects in log_state_change #581

Open Icantjuddle opened 1 year ago

Icantjuddle commented 1 year ago

Expected Behavior

I've been keeping small amounts of state in my state machine's state types (i.e. time it was activated). I'd like to be able to access this data in the logger to print it out.

So far I have been unable to figure out how to do this. I've tried log_state_change and log_event for an on_entry event but haven't figured it out.

It seems this results from the type signature and that the actual state objects could be available.

https://github.com/boost-ext/sml/blob/0387da02f243c29e7b5e2810b9e556cde0c75a85/include/boost/sml.hpp#L2491-L2498

Actual Behavior

No way to log state objects.