Details
- Reviewers
ldionne Mordante philnik var-const • Quuxplusone - Group Reviewers
Restricted Project - Commits
- rG6a56d5cc25cd: [libc++] Fix LWG3589 "The const lvalue reference overload of get for subrange...
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/include/__ranges/subrange.h | ||
---|---|---|
230 | I'll throw parens around the whole expression, because now I'm paranoid some compiler won't like top-level requires A || B; but I'll keep the parens on the individual terms too, for clarity. | |
libcxx/test/std/ranges/range.utility/range.subrange/get.pass.cpp | ||
49 | Since this copies the sentinel even when r is an rvalue, I think it's OK — might even be a test-coverage benefit! |
Tweak parens (I went with @Mordante's version after all), re-poke CI just for the heck of it.
Mark two ranges tests as UNSUPPORTED: libcpp-no-unsupported-ranges to fix https://buildkite.com/llvm-project/libcxx-ci/builds/8211
(D118507 is tangentially related.)
My last diff misspelled libcpp-has-no-incomplete-ranges, and anyway I just pushed that fix, so remove it from here again. Poke CI.
LGTM with one minor issue.
libcxx/test/std/ranges/range.utility/range.subrange/get.pass.cpp | ||
---|---|---|
49 | Please add a comment why this is safe |
I don't mind (_Index == 1), but the current code doesn't match the LWG issue.