std::ranges quickstart
- cover normal algorithm adapters (ie find_if)
- cover basics of using
|for composing of range views - show string split utility
- show constexpr
It would be nice if you also talk about the lazy evaluation of some ranges algorithms and how that works. Also the performance benchmarks comparing them with normal STL algorithms.
It would be important to mention range categories and how applying views may change them.
It would be important to mention range categories and how applying views may change them.
Can you elaborate? I don't see range categories discussed in the standard. I'm not sure where to look for that info.
I think they mean the refinement of std::ranges::range modeled by views depending on the characteristics of the ranges piped into them. Those can be gleamed from the iterator_concept member of the iterator of range factories and adaptors. Like https://eel.is/c++draft/ranges#range.iota.iterator-1.
Yes, I was talking about the range concepts, like std::ranges::input_range, std::ranges::sized_range etc.
Some view adapters will change the category of the resulting range. Like filter here.
This may sometimes lead to unexpected compile errors, or performance loss. For example, the upcoming std::ranges::to has an overload, that works with std::ranges::sized_range, which allows it to reserve space in container. But with a std::ranges::forward_range (which we have after applying filter) it may make lots of allocations due to resizing.
I'm going to keep this very high level, and refer people back to comments and notes here.
Here is the outline I will be using: https://compiler-explorer.com/z/98n3Tsjo7
Available: https://youtu.be/sZy9XcGHmI4