~/talk

Great C++ is_trivial: trivial type traits

Talkat CppCon 2023 · on Monday, 2023-10-02· [typescript]
slides:none on file

Claim: knowing the exact is_trivially_destructible and trivially copyable rules makes performance questions about moves and copies moot. Shows concrete examples (return by value vs move, structured bindings, pass-by-value vs pass-by-move), inspects compiler output (assembly/Godbolt) and notes compilers since 1998 perform RVO while debug builds may still call move unless compilers treat move as builtin. Measures allocations (typical growth yields ~3 allocations), and recommends rule of zero and preferring trivial types.

AI-written summary · about

  1. 0:00Introduction
  2. 3:41Return value optimization and trivial types
  3. 12:35Pass by value vs move
  4. 24:17Trivial destructibility
  5. 29:35Trivial copyability and constructibility
  6. 40:44Defining trivial types
  7. 47:09Trivial efficiency best practices
  8. 56:03Rule of Zero benefits
  9. 57:50Q&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.