~/talk

Beginners Guide to C++'s Best Kept Secret -- std::algorithm

Talkat C++ on Sea 2022 · 2022-07-05..07-07· [c-and-cpp]
slides:none on file

Begins from raw for loops and shows concrete rewrites that use iterators, range for, and std::algorithm to compute the average of the top three positive integers in a vector. Uses copy_if to filter, then sort + accumulate or alternately partition and nth_element to avoid full sorts, and mentions C++20 ranges and parallel policies like std::execution::par. Claims over 100 algorithms exist (≈105), demonstrates fewer lines, fewer bugs, and practical performance/maintainability tradeoffs.

AI-written summary · about

  1. 0:00Start
  2. 0:32Goals
  3. 3:51Data Structures
  4. 4:35Introducing Standard Vector
  5. 6:56Optimization
  6. 13:42Iterators
  7. 15:29Interval Notation
  8. 22:14Range Based for Loops
  9. 24:08Standard Algorithm
  10. 24:55The Software Development Life Cycle
  11. 29:12Sorting Approach
  12. 34:02Copyif
  13. 35:46Back Inserter
  14. 36:53Accumulate
  15. 40:20Sorting Operations
  16. 41:03Partitioning
  17. 41:18Stable Partition
  18. 42:44Median Filters
  19. 43:30Numeric Operations
  20. 44:07Random Generator
  21. 44:26Standard Ranges
  22. 45:57Pipe Operator
  23. 47:19Performance
  24. 47:51Overloads
  25. 54:24Further Resources and Training Materials
~/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.