Skip to content

Commit

Permalink
[oneDPL][ranges][zip_view] + fix operator<=> implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeDvorskiy committed Nov 28, 2024
1 parent 929c237 commit 555e1ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/oneapi/dpl/pstl/zip_view_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ 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.current_ <=> y.current_;
if (x.current_ < y.current_)
return -1;
else if (x.current_ == y.current_)
return 0;
return 1; //x.current > y.current_
}

friend constexpr auto operator-(const iterator& x, const iterator& y)
Expand Down

0 comments on commit 555e1ee

Please sign in to comment.