C++ Concepts and Ranges
summary
Concrete changes to C++20 are demonstrated: actual concept syntax, shortforms for constrained auto, and recent San Diego edits that alter return-type checking and shortcut rules. Examples show how requires expressions produce clearer compile errors, how customization point objects implement ADL-safe swap and begin/end, and how ranges return dangling-safe iterator wrappers for temporaries. Range views, adapters (filter transform join), and two available implementations (range-v3 and a GCC-only fork) are exercised, with a few accepted fixes still pending.
AI-written summary · about
chapters (33)
- 0:00Intro
- 1:38How do you feel about that interface?
- 2:32Why concepts?
- 6:50What are concepts?
- 9:07San Diego 2018: Updated shorthand notation
- 10:06San Diego 2018: New terse notation
- 13:18requires expression
- 15:23Core language concepts
- 17:06Why we need a new kind of customization point?
- 19:01Customization point objects
- 22:59Comparison concepts
- 23:42Object concepts
- 25:53Equality preserving expressions
- 26:50Callable concepts
- 29:08Readable traits and iter_value_t
- 31:31Iterator concepts: Readable
- 31:52Iterator concepts: Weakly Incrementable
- 32:45Iterator concepts: Iterator
- 32:57Iterator concepts: Sentinel
- 33:14Iterator concepts: SizedSentinel
- 33:46Iterator concepts: InputIterator
- 34:49Iterator concepts: Contiguous Iterator
- 35:05Default sentinel
- 36:06Unreachable sentinel
- 37:26Common Iterators
- 40:26Concept Range
- 42:05Customization point: enable_view
- 49:07Views vs Range Adaptor Objects
- 49:52Function objects
- 50:42Projection
- 51:32Algorithms Lookup
- 55:14Take aways
- 56:42Implementations
related talks
01h 01mDocumentation in the Era of Concepts and Ranges
01h 02mC++20 - My Favorite Code Examples
01h 23mC++23 Standard Library Preview
01h 01mthe Concepts of concepts
01h 02mAn Overview of C++11/14, Part I
42mAwaiting for the ranges: C++17
01h 38mC++20: Reaching for the Aims of C++
01h 03mUnlocking the value of C++20
