~/talk

Back to Basics: Move Semantics

Talkat CppCon 2021 · on Tuesday, 2021-10-26· at 07:45· online· [rust]
slides:none on file

Shows concrete code and rules: a vector<string> example demonstrates that replacing copying with move constructors cuts heap allocations and is noticeably faster; shows when to use std::move, when push_back calls copy vs move, and how emplace_back plus forwarding avoids extra temporaries. States moved objects are valid but unspecified, explains generated move ctor/assign, move-only types, noexcept guidance, and how const members or a virtual destructor disable automatic moves. Covers perfect forwarding and universal/forwarding references with examples.

AI-written summary · about

  1. 0:00Introduction
  2. 0:54Move Semantics
  3. 9:48Move Semantics Examples
  4. 19:53Move Semantics Explained
  5. 26:15Move Semantics Methods
  6. 31:02Move Semantics in Classes
  7. 33:11Example Move Semantics
  8. 39:26Disable Move Semantics
  9. 43:18Perfect Forwarding
  10. 54:20Universal Reference
~/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.