Back to Basics: Const as a Promise
summary
Argues that const is a promise that turns runtime errors into compile-time checks and warns to use it proactively, not as reactive linting; demonstrates pointer/reference pointer-to-const vs const-pointer semantics and the qualification conversion rules that allow adding but not stripping cv qualifiers; shows why top-level const on by-value parameters is useless and why const member functions must be declared (and often overloaded) so operator[] returns sensible types, using a simple string class and code examples to prove each point.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:36What const is useful for
- 9:06Syntactic basics of const
- 16:20Const in declarations
- 26:37Const as a promise
- 37:07Const in iterators
- 40:01Where to put const in parameters
- 51:21Const in class design
- 1:00:17Overloading and const
- 1:01:01Summary and Q&A








