Skip to content

Commit

Permalink
[oneDPL][ranges][zip_view][test] a fix for zip_view::iterator::operator-
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeDvorskiy committed Nov 6, 2024
1 parent 32d192f commit 78abd7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/oneapi/dpl/pstl/zip_view_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class zip_view : public std::ranges::view_interface<zip_view<Views...>> {
friend constexpr auto operator-(const iterator& x, const iterator& y)
requires all_random_access<Const, Views...>
{
return x.distance_to_it(y.current_, std::make_index_sequence<sizeof...(Views)>());
return y.distance_to_it(x.current_, std::make_index_sequence<sizeof...(Views)>());
}

friend constexpr iterator operator+(iterator it, difference_type n)
Expand Down

0 comments on commit 78abd7f

Please sign in to comment.