~/talk

Classes C++23 Style

Talkat C++Online 2025 · 2025-02-26..02-28· [c-and-cpp]
slides:none on file

Practical checklist of modern C++ class construction: shows how to pick lifecycle strategy (value, container, resource, singleton) and which special members to implement, demonstrates rule of zero vs rule of five, introduces move-only std::function for move-only wrappers, explains using deducing this to avoid accessor-dangling bugs, and gives working examples of constexpr compile-time checks, transient allocations with constexpr unique_ptr, and std::formatter specializations. Useful if you want concrete code patterns and compiler-checked recipes rather than theory.

AI-written summary · about

  1. 0:00Introduction
  2. 1:26What is a class?
  3. 3:30Class semantics and lifecycle
  4. 5:59Simple value types
  5. 7:23Rule of zero
  6. 9:14Containers and rule of five
  7. 10:17Resource wrappers
  8. 12:03Non-copyable helper
  9. 13:08Move-only function objects
  10. 14:12Semantic singletons
  11. 15:14Compile-time checks
  12. 16:41Comparison for regular types
  13. 18:47Implementing comparison correctly
  14. 22:27Compile-time evaluation
  15. 24:39const, consteval, and constinit
  16. 26:25C++23 compile-time asserts
  17. 28:13Compile-time unique pointers
  18. 31:46Transient allocations
  19. 32:30Making types formattable
  20. 35:48Runtime formatting
  21. 36:51Accessing members safely
  22. 41:28Deducing this explained
  23. 44:17Summary and best practices
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.