~/talk

C++ Iteration Revisited 2024

Talkat C++ on Sea 2024 · 2024-07-02..07-05· [frontend-architecture]
slides:none on file

Argues that STL iterators cause UB (dangling, invalidation, out‑of‑bounds) and replaces pointer semantics with an index/cursor model implemented in Flux, a C++20 library that makes the four iteration ops explicit (init, is_last, read_at, inc). Flux defaults to bounds‑checked reads, returns optionals for empty results, preserves compatibility with STL ranges, offers an unsafe read_at_unchecked, and uses an internal iteration hook for_each_while to let compilers auto‑vectorize (examples show AVX and cases where Flux outperforms C++20 ranges).

AI-written summary · about

  1. 0:00Introduction
  2. 1:34Safer iteration motivation
  3. 19:27Iteration models theory
  4. 24:21Index-based iteration safety
  5. 33:15Flux library concept
  6. 49:30Flux practical examples
  7. 1:01:41Sequence protocol in Flux
  8. 1:07:43STL ranges compatibility
  9. 1:12:18Performance optimizations
  10. 1:21:55Summary
~/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.