Random ideas around writing an FSM library, with examples from, and motivations behind hfsm.dev, a header-only library created using #cpp template #metaprogramming with #gamedev, #embedded and #robotics in mind.
*Reuse vs reimplement*
State machines can be deceptively complex, and, unless a trivial one is needed, a reusable framework is highly recommended.
Rolling out one's own for special needs is ok.
Otherwise - pick from a variety of existing solutions from #boost, on #github, etc.