diff --git a/include/oneapi/dpl/pstl/zip_view_impl.h b/include/oneapi/dpl/pstl/zip_view_impl.h index dcdce7421b2..8a65e372640 100644 --- a/include/oneapi/dpl/pstl/zip_view_impl.h +++ b/include/oneapi/dpl/pstl/zip_view_impl.h @@ -200,7 +200,7 @@ class zip_view : public std::ranges::view_interface> { friend constexpr auto operator-(const iterator& x, const iterator& y) requires all_random_access { - return x.distance_to_it(y.current_, std::make_index_sequence()); + return y.distance_to_it(x.current_, std::make_index_sequence()); } friend constexpr iterator operator+(iterator it, difference_type n)