Open utterances-bot opened 1 year ago
Confucius says "Life is really simple, but we insist on making it complicated" ...
I remember this simply as 'if using | then use std::views else use std::ranges::xxx_view'
Reading the range.adaptor section of the C++ standard is interesting because it lays out all the options a has available before it invokes the underlying algorithm.
Very nice post. I think many’s people are unaware of subrange and subrange_kind. In particular, views::split and views::chunk_by make use of subrange, and I personally think should also allow their caller to specify their subrange_kind. Does anyone think it’s worth writing a wg21 paper on this?
This is extremely confusing and difficult to remember (let alone - to understand). I was looking forward to ranges, but now that they're finally here you can't use them without help from ChatGPT or StackOverflow. Not a good design.
Understanding Ranges Views and View Adaptors Objects in C++20/C++23 - C++ Stories
In this article, we’d shed some light on the implementation of ranges::reverse_view and std::views::reverse. We’ll compare them to understand the differences between views and their adaptor objects. Let’s jump in. ranges::reverse_view and std::views::reverse in Action Let’s look at an example to understand how these views work. Assume we have a range r of integers from 1 to 5.
https://www.cppstories.com/2023/cpp20-understanding-views-impl/