Skip to content

implement == for comparison categories - #242

Merged
Casey Carter (CaseyCarter) merged 1 commit into
microsoft:masterfrom
CaseyCarter:replay
Nov 1, 2019
Merged

Casey Carter (CaseyCarter) merged 1 commit into
microsoft:masterfrom
CaseyCarter:replay

Conversation

@CaseyCarter

Copy link
Copy Markdown
Contributor

Description

WG21-P1614 "The Mothership has Landed" added == operators to the comparison category types (weak_equality, strong_equality, partial_ordering, weak_ordering, and strong_ordering) defined in . This PR implements those operators to bring the comparison category types up to spec once again. It also implements P1614R2's removal of operators that rewrite into calls to operator==(X, nullptr_t) for each comparison category type X.

Drive-by changes:

(This is a replay of Microsoft-internal PR 211172.)

Checklist

If you're unsure about a box, leave it unchecked. A maintainer will help you.

  • I understand README.md. I also understand that acceptance of
    community PRs will be delayed until the test and CI systems are online.
  • Identifiers in product code changes are properly _Ugly as per
    https://eel.is/c++draft/lex.name#3.1 or there are no product code changes.
  • The STL builds successfully and all tests have passed (must be manually
    verified by an STL maintainer before CI is online, leave this unchecked for
    initial submission).
  • These changes introduce no known ABI breaks (adding members, renaming
    members, adding virtual functions, changing whether a type is an aggregate
    or trivially copyable, etc.).
  • These changes were written from scratch using only this repository and
    the C++ Working Draft as a reference (and any other cited standards).
    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.

WG21-P1614 "The Mothership has Landed" added `==` operators to the comparison category types (`weak_equality`, `strong_equality`, `partial_ordering`, `weak_ordering`, and `strong_ordering`) defined in ``. This PR implements those operators to bring the comparison category types up to spec once again. It also implements P1614R2's removal of operators that rewrite into calls to `operator==(X, nullptr_t)` for each comparison category type `X`.

Drive-by changes:
* Move the TODO list of tasks for WG21-P0768 "Library Support for the Spaceship (Comparison) Operator" completion out of `` and into microsoft#64
* Remove the `#if 0 // Not yet implemented` block from ``
@CaseyCarter
Casey Carter (CaseyCarter) requested a review from a team as a code owner October 31, 2019 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants