~/talk

Copy Elision

Talkat C++Now 2018 · 2018-05-06..05-11· [c-and-cpp]
name:Jon Kalb
github:boostcon
slides:none on file

Explains why compilers pass an address for a function result and contrasts the naive copy sequence with return value optimization by showing stack frames for caller G and callee F, where the callee writes directly into the caller’s result slot instead of copying; shows the same for copy elision where a temporary is constructed in the callee frame to avoid a copy. Notes the limitation: it fails when the caller still needs the value afterward or when an lvalue is used.

AI-written summary · about

  1. 0:00Start
  2. 1:30Return Value Unoptimized
  3. 2:34Return value Optimization
  4. 3:28Pass-By-Value Copy Elision
~/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.