When C++ Style Guides Contradict
summary
C++ style guides give conflicting, actionable rules: some require hidden friends to avoid accidental implicit conversions (a real bug in path operators that gets fixed in C++20), others insist on non‑member non‑friend operators; core guidelines and Google disagree on brace initialization while a team of 200 adopters finds uniform braces reduce errors; MISRA forces default cases that -Wswitch warns against; the rule “use exactly one of virtual override final” breaks when a base must forbid overrides, so practical tradeoffs and tool warnings drive what actually works.
AI-written summary · about
chapters (17)
- 0:00Intro
- 0:36The problem
- 4:13Why
- 7:58Tools
- 13:05Uniform initialization
- 14:15Standard guidelines
- 15:45Uniform direct initialization
- 16:32Hidden France
- 20:57Friends
- 22:12Hidden Friends
- 25:49Explicit
- 29:30Misra
- 34:11Final example
- 34:28Virtual override and final
- 35:11Final override
- 43:00Gas target
- 46:40What should we teach
related talks
55mC++ Core and Other C++ Guidelines - The Good, the Bad, the… Questionable?
01h 29mC++ Core Guidelines - Modernize your C++ Code Base
54mTypical C++, But Why?
05mThis is Why We Can't Have Nice Things
01h 41mWriting Good C++14
01h 20mSafer C++: MISRA-C++ : 202X Rules and Beyond
01h 36mBuilding C++ Interfaces That Are Hard to Use Incorrectly
59mBuilding Cpp Interfaces That Are Hard to Use Incorrectly
