<compare>,<functional> Concept-constrained comparisons#385
<compare>,<functional> Concept-constrained comparisons#385CaseyCarter merged 25 commits intomicrosoft:masterfrom
Conversation
CaseyCarter
left a comment
There was a problem hiding this comment.
Here's a bit of actionable feedback.
Co-Authored-By: Casey Carter <cartec69@gmail.com>
Co-Authored-By: Casey Carter <cartec69@gmail.com>
CaseyCarter
left a comment
There was a problem hiding this comment.
This looks fine now. I'll pick it up in a week or so, throw together the std::ranges comparison function objects, and write tests for the whole kit at the same time.
|
@CaseyCarter Should we merge this given that the boolean concept stuff is likely to change in Prague? |
CaseyCarter
left a comment
There was a problem hiding this comment.
Why are we adding the unused _Synth_three_way_result in this PR?
I'm not concerned with adding more uses of |
Co-Authored-By: Casey Carter <cartec69@gmail.com>
Co-Authored-By: Casey Carter <cartec69@gmail.com>
Co-Authored-By: Casey Carter <cartec69@gmail.com>
I thought this PR would be a good place for it even if it's not used yet. |
`ranges::equal_to`, `ranges::not_equal_to`, `ranges::less`, `ranges::less_equal`, `ranges::greater`, and `ranges::greater_equal`. `ranges::equal_to` and `ranges::less` are in `<xutility>` - to be readily available for algorithms that will appearsoon - with the remainder in `<functional>`. Ancillary bits: `<concepts>`: Refactor the comparison concept definitions to avoid redundant requirements for the single-type `equality_comparable`, `totally_ordered`, and `three_way_comparable`. `<compare>`: * ======= BREAK ABI OF `partial_ordering` ======= because (a) Clang wants the comparison category types to be byte-sized, and (b) the "is ordered" boolean is functionally determined by the stored value anyway. * Reimplement `common_comparison_category` and `common_comparison_category_t` to perform `n + c` template instantiations instead of `cn` template instantiations. `<xstddef>`, `<memory>`: Reorder all `is_transparent` declarations in the STL to agree with synopsis order.
* [NFC] weirdness in `<utility>` which closes and immediately reopens `std` * Silence a -Wsign-compare clang warning in `<algorithm>`
|
Thanks for your contribution! (And sorry it took so long for me to fight compiler bugs for test cases and/or get back from Prague.) |
Description
Partial implementation of #62
Edit: It's worth to note that this requires compiler intrinsic for BUILTIN-PTR-THREE-WAY
Checklist
Be sure you've read README.md and understand the scope of this repo.
If you're unsure about a box, leave it unchecked. A maintainer will help you.
_Uglyas perhttps://eel.is/c++draft/lex.name#3.1 or there are no product code changes.
verified by an STL maintainer before automated testing is enabled on GitHub,
leave this unchecked for initial submission).
members, adding virtual functions, changing whether a type is an aggregate
or trivially copyable, etc.).
the C++ Working Draft (including any cited standards), other WG21 papers
(excluding reference implementations outside of proposed standard wording),
and LWG issues as reference material. If they were derived from a project
that's already listed in NOTICE.txt, that's fine, but please mention it.
If they were derived from any other project (including Boost and libc++,
which are not yet listed in NOTICE.txt), you must mention it here,
so we can determine whether the license is compatible and what else needs
to be done.