~/lightning

On parameter sinks

Lightningat Meeting C++ 2024 · 2024-11-14..11-16· [typescript]
slides:none on file

Claim: an rvalue-reference parameter by itself is often only a maybe-move, not a guaranteed move, and that matters for lifetimes and allocations; proven by comparing isolated signatures vs well-designed overload sets like push_back which give a guaranteed move. Advice: follow core guidelines and Google C++ style, prefer an overload set or pass-by-value when the function body is expensive, use a lone rvalue-ref only if the function reports whether it actually sank the value, or make a dedicated move-only type for costly resources.

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.