The Observer pattern is a popular and necessary pattern, so it is surprising that, unlike other languages (e.g., C#), neither C++ nor the Standard Library comes with a ready-to-use implementation. Nonetheless, a safe, properly implemented Observer (if there can be such a thing) is a technically sophisticated construct, so in this chapter, we’ll investigate it with all its gory details.
20. Observer
Get Design Patterns in Modern C++20: Reusable Approaches for Object-Oriented Software Design now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.