I think this is no longer necessary? Should it check for C++20 and later instead?
I think this is no longer necessary as well.
Hmm, but the header file isn't guarded on incomplete ranges?
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
Question: would it make sense to also check rvalue references for good measure?
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)
A few test cases I'd like to add:
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.
This is still relevant.
Please don't forget to remove this after rebasing (due to https://reviews.llvm.org/D132151).
|94 ↗||(On Diff #420511)|
return 0 should stay, unless there was a recent change regarding this that I'm not aware of.
I think a few of these are still not addressed -- in particular, trivial check, default construction and that the arguments are actually moved.