-
Notifications
You must be signed in to change notification settings - Fork 177
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
sml::aux::get_type_name<TAction>() not returning name of lambda function #597
Comments
I wrote this in a hurry at first:
But everything is simpler. To have a name, you need to use not a lambda, but a real function. void on_s1_entry() {}
...
, "s1"_s + sml::on_entry<_> / [] { on_s1_entry(); } use the code next to it void on_s1_entry_f() {}
...
struct on_s1_entry {
auto operator()() { on_s1_entry_f(); }
} on_s1_entry;
...
, "s1"_s + sml::on_entry<_> / on_s1_entry to get the actual name of The names in the example are very similar and it is easy to get confused. |
I figured out the same and switched from lambdas to functors. |
When invoking the function
sml::aux::get_type_name<TAction>()
it does not return the name of the lambda function for the action. Instead it returns a string formatted something like action::<lambda(my_type)>. Is there really no way to get the actual name of the lambda function in state machine logger?The text was updated successfully, but these errors were encountered: