~/talk

The Canonical Class

Talkat CppCon 2014 · on Wednesday, 2014-09-10· at 09:00· Newton· [rust]
links:none on file
slides:none on file

Concrete advice about C++11 class design: prefer use =default or =delete explicitly for each special member, decide whether default construction is meaningful for the type, and pick move semantics (destructive or preservative) as a team rule. Use std::copy for copies, treat std::move as a cast, and avoid patterns that break RVO — avoid breaking RVO. Mark move operations noexcept to enable moves when safe. If tuning performance, provide a custom swap and implement it as "using std::swap" then call swap.

AI-written summary · about

  1. 0:00Introduction
  2. 7:35Rigid coding rules problem
  3. 17:21Default constructibility
  4. 24:31Destructors implications
  5. 30:14Move semantics motivation
  6. 37:47R-values and move operations
  7. 44:58Move semantics definition
  8. 52:17Perfect forwarding
  9. 55:50Semantics and design
  10. 59:02Q&A
~/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.