50 shades of C++
summary
Explains concrete fixes and surprising gotchas: prefer brace initialization by default and avoid parentheses or equals signs; use pass-by-value-and-move for setters to avoid double allocation; watch a returned-reference into a range‑for causing undefined behavior; C++17 value‑category renames and universal/forwarding reference rules cause subtle template surprises; ADL bugs in filesystem::path get resolved with hidden friends for operator==; a 200‑programmer project adopts the style in three months, showing the proposal actually works in practice.
AI-written summary · about
chapters (16)
- 0:00Intro
- 2:03First touch
- 3:43Initialization
- 5:43Multiple ways to initialize
- 10:04Almost always auto
- 17:13Move semantics
- 25:41Hidden France
- 32:26There is no single style
- 33:21Where are we
- 33:59How we are
- 34:37Not paid
- 35:34The numbers
- 36:59Virginia Satya change model
- 38:51Value categories
- 42:41Diagram
- 54:03Bondage








