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

Define operator!= in terms of operator== #1659

Merged
merged 2 commits into from
Feb 15, 2025
Merged

Conversation

Rangi42
Copy link
Contributor

@Rangi42 Rangi42 commented Feb 15, 2025

contrib/coverage.bash reports these as inconsistently used.

@Rangi42 Rangi42 added the refactoring This PR is intended to clean up code more than change functionality label Feb 15, 2025
@Rangi42 Rangi42 added this to the 0.9.2 milestone Feb 15, 2025
@Rangi42
Copy link
Contributor Author

Rangi42 commented Feb 15, 2025

Turns out that g++ 9.3.0 (included with Ubuntu 20.04) does not automatically derive operator!= from operator==. :(

We can still define one in terms of the other, to reduce redundancy.

@Rangi42 Rangi42 changed the title C++20 derives != from operator== as ! of == Define operator!= in terms of operator== Feb 15, 2025
@Rangi42 Rangi42 merged commit 62309d5 into gbdev:master Feb 15, 2025
27 checks passed
@Rangi42 Rangi42 deleted the operators branch February 15, 2025 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring This PR is intended to clean up code more than change functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant