I'm using the Boost 1.64.0 MSM library to produce a hierarchical state machine. For test the transition mechanism, I implement a state machine like this
+------------------------------------------------+
| S |
| +-------------+ +-------------+ |
| | S1 | | S2 | |
| | +-------+ | | +-------+ | |
| | | S11 | | | | S21 | | |
| | +-------+ | | +-------+ | |
| +-------------+ +-------------+ |
| |
+------------------------------------------------+
So how to define transition from S11 to S21, according to the same situation described in wiki the transition execution sequence should be 'exit S11' -> 'exit S1' -> 'enter S2' -> 'enter S21'.