Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix indirect comparisons #489

Draft
wants to merge 1 commit into
base: dev-jbcoe-no-deferred-requirements
Choose a base branch
from

Conversation

jbcoe
Copy link
Owner

@jbcoe jbcoe commented Jan 2, 2025

Do not merge until #478 is submitted.

@jbcoe jbcoe requested review from Twon and nbx8 as code owners January 2, 2025 20:57
@jbcoe jbcoe changed the base branch from main to dev-jbcoe-no-deferred-requirements January 2, 2025 20:57
@jbcoe jbcoe marked this pull request as draft January 2, 2025 20:58
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.55%. Comparing base (2df3748) to head (1772e25).

Additional details and impacted files
@@                         Coverage Diff                         @@
##           dev-jbcoe-no-deferred-requirements     #489   +/-   ##
===================================================================
  Coverage                               99.55%   99.55%           
===================================================================
  Files                                       7        7           
  Lines                                     669      669           
  Branches                                   75       75           
===================================================================
  Hits                                      666      666           
  Misses                                      3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@nbx8 nbx8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good.

@@ -867,12 +869,12 @@ class indirect {
template <class U, class AA>
friend constexpr auto operator<=>(
const indirect& lhs, const indirect<U, AA>& rhs) noexcept(see below)
-> compare_three_way_result_t<T, U>;
-> synth-three-way-result<T, U>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we had previously made this change in the LWG session in Tokyo. This is want we want.

Copy link
Collaborator

@Twon Twon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the constraints here seems fine to me. Given we return synth-three-way-result I'm not sure what we get by additionally specifying it as convertible to bool.

@jbcoe
Copy link
Owner Author

jbcoe commented Jan 9, 2025

Removing the constraints here seems fine to me. Given we return synth-three-way-result I'm not sure what we get by additionally specifying it as convertible to bool.

Should it become a “mandates” or should we lose it altogether. I’m not sure that there is existing precedent in the library.

@Twon
Copy link
Collaborator

Twon commented Jan 9, 2025

Removing the constraints here seems fine to me. Given we return synth-three-way-result I'm not sure what we get by additionally specifying it as convertible to bool.

Should it become a “mandates” or should we lose it altogether. I’m not sure that there is existing precedent in the library.

If we want to be consistent with other types in the standard then looking at the equivalent in std::optional then we would drop it: https://eel.is/c++draft/optional#relops

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