~/lightning

Lightning Talk: Unlocking More Ways To Use Range-Based For

Lightningat CppCon 2021 · on Sunday, 2021-10-24· [typescript]
links:none on file
slides:none on file

Builds a working C++ enumerate by composing a pseudo iterator that holds a counter plus the original iterator, implements ++, != (comparing only the underlying iterator), and dereference to yield index and element, and exposes begin/end so range-based for accepts it. Diagnoses a lifetime bug where temporaries used to construct the range die before iteration and notes brace-init issues; shows fixes, supports begin+size wrappers, key-only or value-only dereference, and returning the raw iterator for in-loop erase — all shown to work.

AI-written summary · about

  1. 0:00Introduction
  2. 0:56enumerate
  3. 1:20Range Base 4
  4. 3:08The Problem
  5. 3:51The BeginningEnd
  6. 4:18End Size
  7. 4:32return intersect
~/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.