Skip to content

Replace platform-specific ctz/clz definitions with C++20 <bit> functions - #2251

Merged
ISSOtm merged 1 commit into
gbdev:masterfrom
Rangi42:std-bit
Nov 24, 2026
Merged

ISSOtm merged 1 commit into
gbdev:masterfrom
Rangi42:std-bit

Conversation

@Rangi42

@Rangi42 Rangi42 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

We tried this at first in #1383, but g++ 9.3.0 on Ubuntu 20.04 didn't have complete stable support for C++20 yet. However, we no longer support gcc 9 as of #1978, and there have been three Ubuntu LTS releases since then so support isn't an issue. So I'll be able to check this off of #2003.

@Rangi42 Rangi42 added this to the 1.0.5 milestone Nov 23, 2026
@Rangi42 Rangi42 added the refactoring This PR is intended to clean up code more than change functionality label Nov 23, 2026
@Rangi42
Rangi42 requested a review from ISSOtm November 23, 2026 23:15
@Rangi42

Rangi42 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Confirmed that this works on Apple OSes older than what CI provides (macOS 11 with clang++ 22, and Mac OS X 10.8 with g++ 14, both available on MacPorts).

@ISSOtm ISSOtm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks fine, if CI is green then this should be good.

@ISSOtm
ISSOtm merged commit edfb9c1 into gbdev:master Nov 24, 2026
31 checks passed
@Rangi42
Rangi42 deleted the std-bit branch November 24, 2026 17:47
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.

2 participants