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

Remove obsolete conditional compilation from <compare> #1049

Merged
merged 12 commits into from
Jul 20, 2020

Conversation

CaseyCarter
Copy link
Member

@CaseyCarter CaseyCarter commented Jul 16, 2020

Now that EDG has caught up to __cpp_impl_three_way_comparison == 201907, we no longer need "downlevel" compatibility for C++20 compilers that either don't define the feature-test macro or define it to a lesser value. We can now assume that _HAS_CXX20 implies __cpp_impl_three_way_comparison >= 201907.

Also fixes #1050.

Now that EDG has caught up to `__cpp_impl_three_way_comparison == 201907`, we no longer need "downlevel" compatibility for C++20 compilers that either don't define the feature-test macro or define it to a lesser value.
@CaseyCarter CaseyCarter added enhancement Something can be improved spaceship C++20 operator <=> labels Jul 16, 2020
@CaseyCarter CaseyCarter requested a review from a team as a code owner July 16, 2020 16:47
@StephanTLavavej

This comment has been minimized.

@CaseyCarter

This comment has been minimized.

@CaseyCarter CaseyCarter changed the base branch from feature/spaceship to master July 16, 2020 22:38
@CaseyCarter CaseyCarter added bug Something isn't working and removed enhancement Something can be improved spaceship C++20 operator <=> labels Jul 16, 2020
stl/inc/compare Outdated Show resolved Hide resolved
stl/inc/compare Outdated Show resolved Hide resolved
stl/inc/compare Outdated Show resolved Hide resolved
tests/std/tests/P0768R1_spaceship_operator/test.cpp Outdated Show resolved Hide resolved
tests/std/tests/P0768R1_spaceship_operator/test.cpp Outdated Show resolved Hide resolved
@StephanTLavavej
Copy link
Member

(Re-adding the Spaceship project as this is relevant, although it's targeted at master)

Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

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

Incrementally approving - only test changes needed now. Really like this improvement!

Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

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

😺

@StephanTLavavej

This comment has been minimized.

@StephanTLavavej

This comment has been minimized.

CaseyCarter added a commit to CaseyCarter/STL that referenced this pull request Jul 17, 2020
... for enregistration, to improve performance. Per a suggestion from Statementreply in the discussion at microsoft#1049 (comment).
stl/inc/compare Outdated Show resolved Hide resolved
CaseyCarter added a commit to CaseyCarter/STL that referenced this pull request Jul 18, 2020
... for enregistration, to improve performance. Per a suggestion from Statementreply in the discussion at microsoft#1049 (comment).
@StephanTLavavej StephanTLavavej self-assigned this Jul 20, 2020
@StephanTLavavej StephanTLavavej merged commit 7930d35 into microsoft:master Jul 20, 2020
@StephanTLavavej
Copy link
Member

Thanks @statementreply for finding this correctness issue before the C++20 ABI locked down, and for improving the fix. Thanks @CaseyCarter for the fix and cleanup, and for helping with the compiler bug investigation. 😸

@StephanTLavavej StephanTLavavej removed their assignment Jul 21, 2020
@CaseyCarter CaseyCarter deleted the compare branch July 21, 2020 00:22
CaseyCarter added a commit to CaseyCarter/STL that referenced this pull request Jul 21, 2020
... for enregistration, to improve performance. Per a suggestion from Statementreply in the discussion at microsoft#1049 (comment).
StephanTLavavej added a commit that referenced this pull request Jul 21, 2020
feature/spaceship: Merge #1049 (fix <compare> and simplify guards)
CaseyCarter added a commit to CaseyCarter/STL that referenced this pull request Jul 28, 2020
* Break <compare> ABI again, and fix microsoft#1050.

* Remove obsolete conditional compilation from <compare>.

Co-authored-by: statementreply <[email protected]>
Co-authored-by: Stephan T. Lavavej <[email protected]>
CaseyCarter added a commit that referenced this pull request Jul 30, 2020
... for enregistration, to improve performance. Per a suggestion from Statementreply in the discussion at #1049 (comment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<compare>: 0 <=> partial_ordering::unordered returns invalid value
4 participants