Iterator Haiku
summary
Ranges TS shows that adding Concept-driven iterator categories expands five standard categories into seven iterator categories then a Sentinel-focused redesign collapses them back to five by dropping unnecessary equality requirements. It uses Concepts and Sentinels to distinguish weak vs strong iterator requirements, finds a transitivity contradiction with stateful Sentinels, removes the offending cross-type equality, and converts a class of undefined runtime behaviors into compile-time errors while preserving expressiveness.
AI-written summary · about
chapters (22)
- 0:00Intro
- 0:42OVERVIEW
- 1:58RANGES IN STANDARD C++
- 2:39RANGE SEQUENCE ELEMENTS BETWEEN TWO ITERATORS
- 4:27THE FIVE C++14 ITERATOR CATEGORIES
- 9:24DOMAIN OF A FUNCTION
- 10:20FORWARD DOMAIN OF
- 11:02INPUT DOMAIN OF
- 13:36PALO ALTO TR
- 21:135 HAVE BECOME 7
- 23:38SENTINEL CONCEPT
- 25:04COMMON TYPE
- 29:16CROSS-TYPE EQUALITYCOMPARABLE
- 31:38ALGORITHMS DONT USE == FOR SINGLE-PASS ITERATORS
- 34:01AXIOMATIZATION OF ITERATORS WITH SENTINELS
- 35:43STATEFUL SENTINELS AND "ALWAYS EQUAL"
- 39:38START OVER WITH ALGORITHM REQUIREMENTS
- 41:09WEAKLYEQUALITYCOMPARABLE
- 42:12WEAK RANGES ARE POSSIBLE
- 42:58STATEFUL SENTINELS WORK
- 45:16MOST IMPORTANTLY
- 46:54TAKEAWAY CONCEPT LIBRARY DESIGN
related talks
39mWhy Iterators Got It All Wrong
01h 11mConcepts in 60: Everything you need to know and nothing you don't
01h 02mDiscovering a User-Facing Concept
31mWhy Iterators Got It All Wrong — and what we should use instead
58mConcept Based Testing
01h 01mAn Overview of Standard Ranges
01h 13mFrom Iterators to Ranges — the Upcoming Evolution of the Standard Library
01h 28mC++ Concepts "Lite" in Practice
