C++20 ranges too many | operators?
TL;DR: In this case, the iterator type of the result of std::views::take is std::counted_iterator, which sometimes fails to model an iterator concept when it’s not expected to fail. This is LWG 3408 and is resolved by P2259. This involves some really complicated mechanism. Let T be the iterator type of values | std::views::filter(even) | std::views::transform(square), … Read more