~/talk

Back to the Basics! Essentials of Modern C++ Style

Talkat CppCon 2014 · on Friday, 2014-09-12· at 10:30· Fermat· [rust]
slides:none on file

Revisits concrete rules: default to auto by default for locals, prefer range-for with auto& for whole-collection loops, and use make_unique/make_shared instead of new/delete; prefer non-owning raw pointers/references for parameters and return values. Gives numbers: about 3 million C++ users, ~30 libstdc++ contributors, ~5–7 libc++ contributors, and a reported 4x RocksDB speedup after changing shared_ptr calls. Exposes the shared_ptr reentrancy pitfall and prescribes pin a local shared_ptr copy as the cure.

AI-written summary · about

  1. 0:00Introduction
  2. 1:00Resisting complexity
  3. 5:57Simple defaults
  4. 9:11Range-based loops
  5. 12:09Modern smart pointers
  6. 16:43Lifetime management
  7. 23:20Safe pointer dereferencing
  8. 28:27Using auto
  9. 34:18Deduction benefits
  10. 38:53Left-to-right style
  11. 45:01Auto corner cases
  12. 51:08Move semantics
  13. 55:15Parameter passing
  14. 59:04Advanced optimizations
  15. 1:03:40Pass by value issues
  16. 1:10:21Efficient setters
  17. 1:14:07Forwarding references
  18. 1:17:47Multiple return values
  19. 1:23:18Conclusion and Q&A
  20. 1:35:06Final Q&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.