Details
- Reviewers
var-const • Quuxplusone Mordante huixie90 - Group Reviewers
Restricted Project
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/include/__algorithm/out_value_result.h | ||
---|---|---|
24 | I think this is no longer necessary? Should it check for C++20 and later instead? | |
libcxx/test/std/algorithms/algorithms.results/out_value_result.pass.cpp | ||
11 | I think this is no longer necessary as well. | |
12 | Hmm, but the header file isn't guarded on incomplete ranges? | |
27 | Nit: a few of these lines are longer than 120 columns. Optional: maybe use a type alias to cut down the boilerplate? I find it a little hard to separate the useful information in each check. template <class T, class U> using Res = std::ranges::out_value_result<T, U>; // Any short name would do | |
36 | Question: would it make sense to also check rvalue references for good measure? | |
41 | Nit: a similar check above uses a value, not a reference, for the second template argument. Can this be consistent? (assuming either can be used in this case) | |
64 | A few test cases I'd like to add:
| |
65 | Can you please add a comment to each test case that briefly explains what it does? |
I haven't read all you comments @var-const. I updated the tests reflect the changes from D121435, that should address all your comments. If it doesn't, then we might be missing test coverage in all tests. I also updated the naming style here, which I will do for the other result types in a different PR.
I haven't read all you comments @var-const. I updated the tests reflect the changes from D121435, that should address all your comments.
I think a few of those comments are still relevant (unless I'm missing something).
libcxx/test/std/algorithms/algorithms.results/out_value_result.pass.cpp | ||
---|---|---|
27 | This is still relevant. | |
64 | Still relevant. | |
65 | Still relevant. |
LGTM with comments addressed and green CI
libcxx/test/std/algorithms/algorithms.results/out_value_result.pass.cpp | ||
---|---|---|
66 | I would also add a runtime test to check out the && overload works (for move only types) |
libcxx/include/__algorithm/out_value_result.h | ||
---|---|---|
24 | Please don't forget to remove this after rebasing (due to https://reviews.llvm.org/D132151). | |
libcxx/test/std/algorithms/algorithms.results/in_out_result.pass.cpp | ||
94 | return 0 should stay, unless there was a recent change regarding this that I'm not aware of. | |
libcxx/test/std/algorithms/algorithms.results/out_value_result.pass.cpp | ||
64 |
I think a few of these are still not addressed -- in particular, trivial check, default construction and that the arguments are actually moved. |
I think this is no longer necessary? Should it check for C++20 and later instead?