Explore the world of state machine implementations in modern C++ through an engaging battle-style presentation. Dive into various approaches, from naive solutions to advanced libraries, comparing their compilation time, run-time performance, memory usage, executable size, and readability. Begin with a showdown between traditional if/else and switch/enum methods against C++17's std::variant and C++20's coroutines. Progress to Boost libraries, including Boost.Statechart and Boost.MetaStateMachine, before introducing the [Boost].StateMachineLanguage (SML) library. Analyze different dispatching techniques through 'godbolting' and gain insights into the power of compile-time feature set and behavior modifications. By the end, acquire a comprehensive understanding of state machine implementations, their trade-offs, and guidelines for selecting the most suitable solution for specific problems in C++ development.
Overview
Syllabus
C++Now 2019: Kris Jusiak “Rise of the State Machines”
Taught by
CppNow