~/talk

Back to Basics: Const as a Promise

Talkat CppCon 2019 · 2019-09-15..09-20· [c-and-cpp]
slides:none on file

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

  1. 0:00Introduction
  2. 1:36What const is useful for
  3. 9:06Syntactic basics of const
  4. 16:20Const in declarations
  5. 26:37Const as a promise
  6. 37:07Const in iterators
  7. 40:01Where to put const in parameters
  8. 51:21Const in class design
  9. 1:00:17Overloading and const
  10. 1:01:01Summary and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.