Unverified Commit 04dbf7ad authored by A. Jiang's avatar A. Jiang Committed by GitHub
Browse files

[libc++][ranges] Avoid using `distance` in `ranges::contains_subrange` (#87155)

Both `std::distance` or `ranges::distance` are inefficient for
non-sized ranges. Also, calculating the range using `int` type is
seriously problematic.

This patch avoids using `distance` and calculation of the length of
non-sized ranges.

Fixes #86833.
parent c45861f4
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment