Design Patterns: Examples in C++
summary
Tour of 20+ GoF patterns with concrete C++11 code: claims and tradeoffs, runnable Godbolt links, and a few working utilities. Covers C++11-compliant examples (make_shared, std::function, lambdas, templates), shows a factory/registry lambda map that registers constructors by key and instantiates on demand, explains C++11 thread-safe Singleton via function-local static, and demonstrates Visitor for tree traversal and a prototype clone idea; code is lightweight but executable and practical.
AI-written summary · about
chapters (31)
- 0:00Intro
- 0:37Design Patterns
- 2:42Who am I
- 3:58Benefits of design patterns
- 5:04History of design patterns
- 7:10What are design patterns
- 11:42Generic Patterns
- 15:21Extended Patterns
- 20:09Concurrency Patterns
- 21:26Creational
- 21:51Factory
- 22:52Prototype
- 24:10Adapters
- 25:20Examples
- 29:05Specialized Languages
- 30:07Observer
- 31:29State Machines
- 32:04Encryption Algorithms
- 32:38Multiple Template
- 33:07Visitor
- 34:07Categories
- 34:36Middle Tier
- 36:30Abstract Factory
- 40:27Clone
- 44:16Static Initializer
- 46:26Singletons
- 48:12Global Scope
- 54:57Structural
- 55:17Performance Security
- 55:47Adapter
- 58:51Daisy Chain
related talks
01h 00mC++ Design Patterns: From C++03 to C++17
43mDesign Patterns - The Most Common Misconceptions (1 of N)
01h 07mDesign Patterns in Modern C++
01h 01mFunctional C++
01h 02mC++20 - My Favourite Code Examples
01h 03mFunctional C++ for Fun & Profit
55mRevisiting Design Patterns After 20
47mDesign Patterns - The Most Common Misconceptions (2 of N)
