~/talk

Back to Basics: The Rule of Five in C++

Talkat CppCon 2023 · on Friday, 2023-10-06· at 09:00· Maple 3/4/5, 6700 North Gaylord Rockies Boulevard· [rust]
links:none on file
slides:none on file

Explains the actual claim that if any special member needs work the others probably do too and demonstrates it by building a simple string class with raw pointer bugs then adding copy ctor, copy assign, move ctor, move assign and destructor so the fixes actually work and sanitizers stop screaming. Shows compiler behavior charts, uses unique_ptr and shared_ptr, explains when to use equals default and equals delete, and ends on preferring the rule of zero.

AI-written summary · about

  1. 0:00Rule of Five intro
  2. 1:05C++ Core Guidelines
  3. 2:08C++ value-based object lifetime
  4. 4:36Rule of Five with string class
  5. 10:59Move semantics in C++11
  6. 15:34Formal Rule of Five
  7. 16:59Compiler special member functions
  8. 21:17Smart pointers for memory
  9. 24:51Copy/move challenges
  10. 27:17Rule of Five with smart pointers
  11. 28:00Rule of Zero intro
  12. 29:48Rule of Zero benefits
  13. 30:51Code design intent
  14. 32:54Closing & 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.