~/talk

Copy Elision

Talkat CppCon 2018 · 2018-09-23..09-28· [rust]
name:Jon Kalb
github:boostcon
slides:none on file

Explains the concrete claim that compilers generally construct return objects in caller storage so copies are elided, using low‑level stack‑frame diagrams and compiled calling conventions as the tool. Demonstrates three cases: a straightforward return (RVO succeeds), a conditional return (RVO can fail because the chosen object is unknown at compile time), and passing temporaries (elision applies only to temporaries only). Notes the practical surprise that copy‑constructor side effects may not run and shows corrected examples and slides that validate the behavior.

AI-written summary · about

~/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.