[libcxx-commits] [libcxx] [libc++] optimization on ranges::drop_view::begin (#72883) (PR #72929)
Will Hawkins via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 20 20:15:14 PST 2023
hawkinsw wrote:
> Oops, I didn't pay attention to `non-common` range...
Which would get us to a position where
1. `ranges::end(__base_)` is of a different type than `ranges::begin(__base_)`
2. therefore, `ranges::end(__base_)` might not model `random_access_iterator`
3. therefore, it would not meet the constant-time-complexity requirements for `std::ranges::next` (see (4) at https://en.cppreference.com/w/cpp/iterator/ranges/next).
I just wanted to double check the reasoning. Thank you for doing this work!
Will
https://github.com/llvm/llvm-project/pull/72929
More information about the libcxx-commits
mailing list