~/talk

Typical C++, But Why?

Talkat CppNorth 2023 · 2023-07-17..07-19
slides:none on file

Argues that leaning on the C++ type system turns runtime bugs into compile errors by using explicit constructors and conversion operators, enum class and small strong types, a must_init wrapper and a buffer_view instead of raw pointer+length, and designated initializers or config structs to avoid fragile defaults. Demonstrates replacing boolean flags and positional booleans with named enum class parameters and strong types (must_init, buffer_view), recommends std::span only as implementation detail, and shows C++20 spaceship convenience.

AI-written summary · about

  1. 0:00Introduction to Typical C++
  2. 4:45Why use strong types
  3. 12:24Sanitized string example
  4. 17:21Avoiding boolean parameters
  5. 21:50Dangerous default parameters
  6. 25:47Buffer views for memory safety
  7. 30:06Server socket configuration
  8. 33:48Must-init template example
  9. 36:23Unique types for IDs
  10. 41:43String-based enum classes
  11. 44:12Benefits of modern C++ types
  12. 48:48Further learning resources
~/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.