there are about 1 million c++ state machines, and sml happens to be the best, or one of them. how does yours differentiate?
I've built [CXXStateTree](https://github.com/ZigRazor/CXXStateTree), a modern C++ header-only library to create hierarchical state machines with clean, intuitive APIs.
It supports: - Deeply nested states - Entry/exit handlers - State transitions with guards and actions - Asynchronous transitions with `co_await` (C++20 coroutines) - Optional runtime type identification for flexibility
It's ideal for complex control logic, embedded systems, games, robotics, and anywhere you'd use a finite state machine.
I’d love feedback, use cases, or contributions from the community!
there are about 1 million c++ state machines, and sml happens to be the best, or one of them. how does yours differentiate?
What exactly happened there? It looks like make_transition_table() is doing some serious magic. Or are the state transitions evaluated at compile-time given that there is no input in the example, and then the transition table gets compiled out?
Anyway, I think it would help OP's library to have some assembly output in the readme as well.
[0]: https://en.cppreference.com/w/cpp/language/user_literal.html
[1]: https://github.com/boost-ext/sml/blob/f232328b49adf708737bef...