~/talk

Understanding C++ Value Categories: lvalue, rvalue, xvalue, std::move, std::forward & Best Practices

Talkat C++ on Sea 2025 · 2025-06-23..06-25· [c-and-cpp]
slides:none on file

Clear, example-driven breakdown of why C++ has five value categories (lvalue, xvalue, prvalue, glvalue, rvalue), how rvalue references plus std::move enable move semantics, and when std::forward (universal/forwarding references, reference collapsing) preserves value category. Shows concrete surprises: const temporaries defeat moves (so std::move can trigger a copy), C++17 mandates guaranteed elision, and move ops should be noexcept. Uses short quizzes and code examples to prove behavior and recommend fixes.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 2:02Understanding expressions
  3. 9:17Historical context and categories
  4. 16:44The five value categories
  5. 23:16Categorization and examples
  6. 36:07Rvalue references
  7. 37:47Move semantics in practice
  8. 42:21Universal references and templates
  9. 50:14Perfect forwarding and best practices
~/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.