~/talk

Back to Basics: Move Semantics

Talkat CppCon 2020 · 2020-09-14..09-18· [compilers-and-language-design]
links:none on file
slides:none on file

Covers exactly how rvalue references and std::move turn expensive copies into cheap transfers, when the compiler auto-generates move ctor/assign or deletes them, and why move ops must be explicitly noexcept. Shows concrete code patterns: writing move constructors/assignments with std::exchange, leaving moved-from objects valid (ideally default-constructed), adding self-assignment checks, preferring =default when safe, and the performance benefits for containers and move-only types like unique_ptr.

AI-written summary · about

  1. 0:00Introduction
  2. 0:20The Standard Library
  3. 1:51Assignment Operator
  4. 5:30L vs R Values
  5. 9:32Guidelines
  6. 12:44StandedMove
  7. 16:43Dont StandedMove
  8. 18:45Move Constructors Move Assignment Operators
  9. 21:40Move Constructors
  10. 27:01Move Assignment Operators
  11. 31:05Move from Object
  12. 35:14Move Selfassignment
  13. 37:31Rule of Five
  14. 40:04Universal References
  15. 42:13Move Only Types
  16. 43:53Resources
  17. 44:44Move Summary
  18. 45:22Benefits
  19. 45:39Questions
  20. 51:01Related Questions
~/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.