~/talk

C++ Const Correctness Refresher

Talkat ACCU 2022 · 2022-04-06..04-09· [c-and-cpp]
links:none on file
slides:none on file

Covers concrete const-correctness fixes: use strict compiler diagnostics and static analysis, make objects const by default, and propagate immutability for owned data by returning const references or smart pointers instead of exposing mutable backdoors. Shows common failures from open-source reviews—auto type deduction dropping const, pointer reassignment vs comparison, iterator proxies and smart-pointer reassignment—and gives fixes like explicit reference/pointer syntax, immediate lambda initialization for const locals, and using mutable for internal caches while warning about thread-safety.

AI-written summary · about

  1. 0:00Intro
  2. 0:11Const-correctness
  3. 1:14Why is it important ?
  4. 2:10Guidelines and standards
  5. 3:05Variables
  6. 6:13Auto type deduction
  7. 9:01Smart pointers
  8. 9:26Function parameters
  9. 10:36Initialization
  10. 11:32Objects
  11. 14:49Immutable visible state
  12. 16:40Recommendations/considerations (reflect my opinion)
~/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.