Implements parts of:
- P0898R3 Standard Library Concepts
- P1754 Rename concepts to standard_case for C++20, while we still can
Differential D77961
[libcxx] adds concept `std::convertible_to` cjdb on Apr 11 2020, 10:23 PM. Authored by
Details
Implements parts of:
Diff Detail
Event TimelineComment Actions I left mostly some nits with respect to readability. Great job
Comment Actions @miscco I don't mind handing this PR off to you if you're wanting to champion the remaining bits. Comment Actions @cjdb This was just a ping to see whether you are still interested. If you say you have no time / interest I might carve some time out in the near future but it would take a while Comment Actions This looks pretty good to me except the duplication of implementations when intrinsics are available. More generally, have we looked into the MSVC tests for concepts? Would it make sense to import them here too or at least make sure we have the same coverage?
Comment Actions
From what I've seen, MSVC seems to have one monolithic file for all the concepts, so I think there are two options for us to choose from if we want to include them:
The advantage of approach (1) is that it's fast, and MSVC STL contributors can painlessly update our copy of the test file whenever theirs is also updated. Which do you prefer? Comment Actions I think we could do (1). In the meantime, let's try to make sure we have good test coverage by ourselves (as you did here).
|
As discussed offline, I would rather we use the same implementation all the time to simplify things. Let's not duplicate each implementation based on whether we can use intrinsics or not. The type traits themselves use the intrinsics, I think that's sufficient.