~/talk

Iteration Revisited: A Safer Iteration Model for C++

Talkat CppNorth 2023 · 2023-07-17..07-19· [compilers-and-language-design]
slides:none on file

Argues that pointer-style STL iterators are a UB minefield and presents Flux, a C++20 library that replaces iterators with cursor-based indices (flux_first/is_last/read_at/ink), avoids dangling and invalidation UB by design, and makes read_at bounds-checked (with read_at_unchecked for hotspots). Offers compatibility: contiguous ranges work directly, other ranges wrap via from_range, and every Flux sequence can present a standard iterator. Claims performance is competitive and can beat C++20 Ranges by using for_each_while internal iteration that enables vectorization and optional bounds checks.

AI-written summary · about

  1. 0:00Introduction to iteration
  2. 0:48History of STL iterators
  3. 4:57The dangers of pointers
  4. 14:28Designing a safer approach
  5. 25:07Introduction to the Flux library
  6. 36:53Sequence adapters and pipelines
  7. 48:36Compatibility with existing STL
  8. 52:55Performance and summary
~/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.