~/talk

The Implementation of Value Types

Talkat CppCon 2014 · on Wednesday, 2014-09-10· at 15:15· Newton· [rust]
links:none on file
slides:none on file

Value types require concrete choices: use a representation that minimizes padding and caches hot fields, make copies trivially copyable when possible, and favor pass‑by‑value for very small types (roughly less than two pointers) else const reference. Implement aliasing defenses (conditional copy, read‑before‑write, field recaching). Support literal types to enable non‑type template arguments; user‑defined literals are tricky for units. Beware std::string concurrency/ABI surprises that once invalidated binaries; prefer small string optimization and ensure strict weak ordering, NRVO and strong exception safety.

AI-written summary · about

  1. 0:00Intro
  2. 0:33Definition of Value Types
  3. 1:46Attributes of Built-in Arithmetic Types
  4. 2:00Ad-Hoc Representation
  5. 3:37Mission Creep
  6. 4:34Operation Categories
  7. 5:50Mathematical
  8. 6:34Representational
  9. 6:58Semantic
  10. 8:15Syntactic
  11. 8:35String Append
  12. 10:09Literal Types
  13. 10:37Literal Values
  14. 12:20Redundancy
  15. 13:57Padding
  16. 16:18Trivially Copyable
  17. 21:59Indirect Pass by Value
  18. 23:12Parameter Recommendations
  19. 24:12Slicing
  20. 26:28Pass by Const Ref
  21. 27:35Named Return value Optimization
  22. 28:36Approaches
  23. 29:15Copy a Potentially Aliasing Parameter
  24. 29:55Conditionally Copy
  25. 30:30Conditionally Do Not Copy
  26. 31:45Aliasing Fields
  27. 32:07Read Caching Fields
  28. 34:36Global State
  29. 35:23Static Initialization Order
  30. 36:57Concurrency
  31. 39:12Exceptions
  32. 40:05Allocate Before Changes
  33. 40:36Recover Resources
  34. 41:32Responsibilities
  35. 42:11Avold Redundant Memory Access
  36. 43:22Inlining
  37. 51:04IBM System 360
  38. 51:34Follow Along
  39. 52:11Choose Portable Types
~/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.