Combining C++17 Features
summary
Shows concrete C++17 recipes: use compile-time if plus if-with-init and scope_lock to lock zero or many mutexes without deadlock; use class template argument deduction but beware brace-init traps that deduce wrong array types; replace recursive variadic templates with fold expressions to remove instantiation overhead; use string_view to avoid copies and speed a sort about 2.5×; use parallel algorithms and a tree-based partial_sum to get ~10× on many cores; use std::variant + visit + overloaded lambdas for value‑semantics polymorphism.
AI-written summary · about
chapters (18)
- 0:00Start
- 6:47Class Template Argument Deduction
- 10:10Scope Lock
- 11:36Initialization
- 17:29Templates Variadic Templates
- 18:15Recursive Instantiation
- 27:12Move Semantics
- 30:43Third Example
- 32:15String View
- 39:23Lifetime Profile
- 40:38Parallel Algorithms
- 42:08Parallel Partial Sum Function
- 45:06Polymorphism Overloading Lambdas
- 46:06Shared Pointers and Unique Pointers
- 46:58Keyboard Union
- 49:16Polymorphism
- 52:34Dynamic Pointer Cast
- 54:17Overload Lambdas








