C++ Code Smells
summary
Argues that hundreds of C++ best-practice rules collapse into a handful of actionable smells: missing const, ignored compiler warnings, and heavy use of moves and casts that prevent RVO. Demonstrates live code edits turning raw loops and out-parameters into STL algorithms and return-by-value, shows string→std::string copies replaced with string_view, and warns about magic statics vs constexpr or extern. Recommends tool-driven checks (compiler warnings, clang-tidy, CppBestPractices/CppCon materials) to find the smells and simplify fixes.
AI-written summary · about
chapters (12)
- 0:00Intro
- 0:21Jason Turner
- 1:32C++ Best Practices
- 9:43Raw Loops - Sean Parent
- 15:55Multi-Step Functions
- 23:28Code With Conversions
- 34:32Code Smells
- 40:55Let's Update This Code Sample #2
- 53:47Missing and Ignored Compiler Warnings
- 54:392. Missing const and constexpr, Misplaced
- 55:28Weak Types And Casts
- 56:50Bonus Code Review
related talks
55mIdentifying Common Code Smells (In C++)
56mIdentifying Common Code Smells
01h 22mSimplicity: not just for beginners
55mC++ Core and Other C++ Guidelines - The Good, the Bad, the… Questionable?
54mWriting C++ to Be Read
50mCore and other guidelines. The good, the bad, the... questionable?
54mC++ Common Knowledge
47mHelp, My Team Is Stuck In The 90s
