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

fixed #603: not all zero_wrapper define a get() method, which breaks logging in some cases #613

Closed devzeb closed 3 months ago

devzeb commented 3 months ago

Problem:

603 demonstrates the problem.

A compile error occurs when trying to use a logger in a statemachine, that uses both a process_queue and a member function pointer as an action.

The error message states: 'get': is not a member of 'boost::ext::sml::v1_1_9::aux::zero_wrapper<T,void>'

Solution:

I implemented the member function get() for all specializations of zero_wrapper. Also I added a test for this use case in policies_logging.cpp.

Issue: #603

krzysztof-jusiak commented 3 months ago

Good catch, thank you @devzeb