~/talk

The Hidden Secrets of Move Semantics

Talkat CppCon 2020 · 2020-09-14..09-18· at 13:30· destroy_n(), online· [rust]
slides:none on file

Shows concrete code and measurements: copying vs moving strings with addresses printed, examples proving const disables move, and a container implementation that uses overloads, perfect forwarding, fold expressions and lambdas to support many cases. Explains surprising pitfalls: universal vs forwarding refs (same && syntax) and range-for lifetime bug with temporaries and vector<bool> proxies. Recommends patterns: when to take by value and std::move, when to provide ref-qualified getters and use requires/decltype to enforce behavior.

AI-written summary · about

  1. 0:00Move semantics basics
  2. 21:53Perfect forwarding
  3. 35:01Universal references in practice
  4. 35:49Common move semantics traps
  5. 41:47Getter best practices
  6. 50:06Summary and conclusion
  7. 53:54Q&A session
~/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.