C++ Design Patterns: From C++03 to C++17
summary
Follows several concrete pattern evolutions: a Builder variant uses initializer_list plus move semantics to let templates synthesize boilerplate instead of hand‑writing builders; Visitor shifts from per-class virtual accept boilerplate to a reusable template + lambda overload set that leverages overload resolution, and to alternative polymorphism via std::visit over std::variant; ScopeGuard becomes composable and can auto‑commit/auto‑rollback using C++17’s uncaught_exceptions, turning nested try/catch cleanup into lightweight RAII. Slides and source live on GitHub (CppCon/CppCon2019).
AI-written summary · about
chapters (10)
- 0:00Introduction to design patterns
- 1:36Design patterns evolution and language impact
- 7:03Builder pattern in C++
- 14:49Visitor pattern deep dive
- 29:34Visitor pattern in C++17
- 34:58Scope guard pattern basics
- 41:07Scope guard in C++11 and C++14
- 44:20Scope guard in C++17
- 50:21Language impact on design patterns
- 52:18Q&A and resources
related talks
01h 40mDesign Patterns: Examples in C++
01h 07mDesign Patterns in Modern C++
43mDesign Patterns - The Most Common Misconceptions (1 of N)
01h 28mModern C++ Design reloaded
55mHow to "OO" in C++
10mSession Preview - Interview With – Katherine Rocha
47mDesign Patterns - The Most Common Misconceptions (2 of N)
07mC++ Workshop and Keynote Preview with Klaus Iglberger for C++OnSea 2024
