- std::predicate
- std::relation
- std::equivalence_relation
- std::strict_weak_order
Implements parts of:
- P0898R3 Standard Library Concepts
- P1754 Rename concepts to standard_case for C++20, while we still can
Differential D96477
[libcxx] adds remaining callable concepts cjdb on Feb 10 2021, 6:40 PM. Authored by
Details
Implements parts of:
Diff Detail
Event TimelineComment Actions Nits only for the moment.
Comment Actions Can we please change the .compile.cpp to just .pass.cpp. There's very little to no cost to actually run the test, and doing so seems safer to me.
Comment Actions Generally looks good!
Comment Actions LGTM, approved so @Quuxplusone can give his final approval after addressing his comments.
Comment Actions This LGTM. I like these tests a lot better :) Only question: why do we need a separate test file for "subsumption" tests? WDYT about merging those into the "main" test file?
Comment Actions I plan to go back at some point and add subsumption tests for all concepts. I think there are quite a few that would benefit from being in their own source files for brevity's sake, and wanna keep that consistent.
Comment Actions
As discussed offline, I'm OK a) with these tests and b) with doing them in another file. Just for the sake of posterity: in general, I don't like tests that say "here is the implementation re-written exactly the same way, assert these two implementations look the same." That's what I thought this was at first (and there's an argument to be made that it is still that to a certain degree), but I think it's OK here because the constraints need to be entirely identical. Essentially what we're testing is that std::relation (for example) is implemented using std::predicate and not some helper concept that looks exactly like std::predicate. I'll let @Quuxplusone give the final approval.
Comment Actions Line 429/447 still contains a gratuitous whitespace diff. I suggest fixing that space, then removing the .subsumption.pass.cpp tests from this PR, then landing it.
Comment Actions I don't see why this is blocking. We should have a discussion on Discord to address this suggested approach because I don't understand why you consider it to be "better", but it can be landed in a future patch at any time if we agree on that path.
Comment Actions This patch has been open for almost two months now, so if there's nothing else that urgently needs attention, I'd like to see it merged today.
Comment Actions As I said on Discord, there's nothing here that can't be "fixed in post." We use version control; it's easy to make changes to what's been committed. So since I'm the only one still reviewing this patch, okay, go ahead, I take no further responsibility for its correctness. If @ldionne or anyone else objects to my resigning as reviewer on this revision, they can step in and review it themselves.
Comment Actions LGTM with nitpick applied. Until we enforce the use of clang-format, please consider format-related comments as non-blocking, unless not fixing them really hinders the readability of the code.
Comment Actions Ship it with nitpicks applied. Feel free to fix @curdeius 's nitpicks in this patch too as fly-by's, those are really small.
|
Should this say "13.0"?