Skip to content

Commit

Permalink
Update segments_tools.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeDvorskiy authored Aug 6, 2024
1 parent b8b8f81 commit f440b62
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ auto
make_enumerate(R&& r)
{
using W = std::size_t;
return __ranges::make_zip_view(stdrng::views::iota(W{0}, W{stdrng::size(r)}), std::forward<R>(r));
auto __r = std::ranges::subrange(r.begin(), r.end());
return __ranges::make_zip_view(stdrng::views::iota(W{0}, W{stdrng::size(r)}), std::move(__r));
}

// Take all elements up to and including segment `segment_id` at index
Expand Down

0 comments on commit f440b62

Please sign in to comment.