Details
- Reviewers
ldionne - Group Reviewers
Restricted Project - Commits
- rG8200e1253f6f: [libc++][ranges] Implement `views::drop`.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/include/__ranges/drop_view.h | ||
---|---|---|
259 | Not sure if this is worth making the actual implementation differ from the expressions in the return type and the noexcept clause. Calculating std::min twice seems wasteful (though I guess it should be easily optimized by the compiler?). |
LGTM
libcxx/include/__ranges/drop_view.h | ||
---|---|---|
158–160 | To avoid those getting out of sync, perhaps we should instead make _StoreSize public and access it directly from here as subrange::_StoreSize? |
libcxx/include/__ranges/drop_view.h | ||
---|---|---|
259 | I think it makes sense to have it differ from the expression in the noexcept. Also, we shouldn't be computing ranges::distance(__rng) more than once. |
libcxx/include/__ranges/drop_view.h | ||
---|---|---|
158–160 | Done, thanks. I was thinking the same thing but was concerned about making this implementation detail public; on the other hand, with the "mangled" internal name it should be clear it shouldn't be used. |
clang-format not found in user’s local PATH; not linting file.