From 78abd7fe89530db70ab11b0d92b8fc34297b65a9 Mon Sep 17 00:00:00 2001 From: MikeDvorskiy Date: Wed, 6 Nov 2024 18:47:41 +0100 Subject: [PATCH] [oneDPL][ranges][zip_view][test] a fix for zip_view::iterator::operator- --- include/oneapi/dpl/pstl/zip_view_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)