Implements parts of:
- P0898R3 Standard Library Concepts
- P1754 Rename concepts to standard_case for C++20, while we still can
cjdb on Feb 10 2021, 6:40 PM.Authored by
Implements parts of:
There are a very large number of changes, so older changes are hidden. Show Older Changes
Generally looks good!
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.
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.
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.
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.
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.
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.
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.
Ship it with nitpicks applied. Feel free to fix @curdeius 's nitpicks in this patch too as fly-by's, those are really small.