~/talk

What a View! Building Your Own (Lazy) Range Adaptors (part 2 of 2)

Talkat CppCon 2019 · 2019-09-15..09-20· [c-and-cpp]
links:none on file
slides:none on file

Implements a non‑standard lazy range adaptor called stride_view that skips elements by a user step, including a hand‑rolled iterator type, sentinel handling, and a compute_distance routine that adjusts size (e.g. every 33rd of 100 yields 67,34,1). Adds const‑qualified overloads to avoid race issues, supports front/back/subscript for common/sized ranges, composes with views::reverse, and exposes a range adaptor closure so piping works. Tests compile and pass on MSVC preview (examples and source are on the CppCon repo).

AI-written summary · about

  1. 0:00Introduction and recap
  2. 10:36Implementing stride view
  3. 28:27Testing and filter view issues
  4. 36:01Fixing const-qualified ranges
  5. 42:52Common range and element access
  6. 46:46Reverse iteration and composition
  7. 47:27Range adapter closures
  8. 55:13Conclusion and 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.