~/talk

An (In-)Complete Guide To C++ Object Lifetimes

Talkat LambdaConf 2024 · 2024-05-04..05-10· [rust]
links:none on file
slides:none on file

Concrete rules and examples about when objects actually come into existence and die, not abstract advice: when placement new or std::start_lifetime_as is required, when implicit object creation (malloc, allocation functions, memcpy) makes the compiler “time travel” to invent objects, how provenance defeats naive pointer aliasing, why const-on-heap vs static matters, how unions, mmap/shared memory and std::bit_cast interact with lifetimes, the roles of std::launder and the C++20/23/26 wording changes.

AI-written summary · about

  1. 0:00Introduction
  2. 0:35Object Lifetime
  3. 3:05Structure
  4. 7:00New Delete
  5. 7:49Temporary Objects
  6. 12:11Placement New
  7. 17:53Implicit Object Creation
  8. 26:14Provence
  9. 30:46Conclusion
~/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.