In C++23, the ranges (sub)library has gained std::ranges::zip
, which zips multiple ranges into a single range of std::tuple
's (or pairs). This is nice, and precludes requiring implementing this ourselves, using boost::zip_iterator
or resorting to this kind of a hack*.
However, we also get std::ranges::zip_transform
. Why do we need it? After all , we can apply a ranges::views::transform
to a zipped range, can't we? So, isn't zip_transform
redundant?
* - that hack works well in C++11, and doesn't require tens of thousands of lines of code with concepts...