The core documentation how a transition works seems wrong to me.
The flowchart https://github.com/igor-krechetov/hsmcpp/blob/main/doc/diagrams/wiki_features_callbacks.plantuml
used here: https://hsmcpp.readthedocs.io/en/latest/features/transitions/transitions.html?highlight=transition#overview (the second bigger one about how transitions work).
Shows that transitions can succeed (resulting in entering new state) or fail (result in canceling the transition).
But the transition callbacks are void by definition: https://hsmcpp.readthedocs.io/en/latest/api/typedef_HsmTypes_8hpp_1ab1f89b684e95f81220b157970c806302.html#typedef-hsmcpp-hsmtransitioncallback-t
So the cancel transition can never happen there.
The core documentation how a transition works seems wrong to me.
The flowchart https://github.com/igor-krechetov/hsmcpp/blob/main/doc/diagrams/wiki_features_callbacks.plantuml
used here: https://hsmcpp.readthedocs.io/en/latest/features/transitions/transitions.html?highlight=transition#overview (the second bigger one about how transitions work).
Shows that transitions can succeed (resulting in entering new state) or fail (result in canceling the transition).
But the transition callbacks are void by definition: https://hsmcpp.readthedocs.io/en/latest/api/typedef_HsmTypes_8hpp_1ab1f89b684e95f81220b157970c806302.html#typedef-hsmcpp-hsmtransitioncallback-t
So the cancel transition can never happen there.