Summary
In this chapter, we went through the Observer pattern, both runtime and compile-time implementations.
Compile-time implementation is utilizing what we know about the application during compile-time. It is based on variadic template classes and fold expressions. The result is super compact and fast code, as we are not storing information about subscribers in a container, nor do we need to iterate through the container to make a call to update
methods.
In the next chapter, we will cover Finite State Machines (FSM) and the implementation of the State patterns in C++.
Join our community on Discord
Join our community’s Discord space for discussions with the author and other readers:
https://packt.link/embeddedsystems