~/talk

Return Value Optimization: Harder Than It Looks

Talkat CppCon 2018 · 2018-09-23..09-28· [c-and-cpp]
slides:none on file

Explains where the return slot lives in typical calling conventions, why C++03/C++11/C++17 rules sometimes elide, sometimes move, and sometimes silently copy; shows surprising failures: slicing and base-class converting constructors block the implicit move, conversion operators and by-value sinks cause copies, rvalue-reference parameters behave differently; implements a Clang diagnostic (-Wreturn-std-move) that detects problematic return x cases and suggests fixes.

AI-written summary · about

  1. 0:00Introduction
  2. 0:45The Return Slot
  3. 1:50Big Objects
  4. 3:08Moving Objects
  5. 4:45Copy Elision
  6. 6:34durian
  7. 7:42RPO rules
  8. 9:43Example
  9. 12:28The real deal
  10. 16:25Why converting constructors
  11. 18:29Examples
~/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.