Skip to content

Make our own "is_integral" and "is_signed" traits. - #392

Merged
Screwtapello merged 1 commit into
bsnes-emu:masterfrom
Screwtapello:dont-mess-with-stdlib-traits
Sep 27, 2026
Merged

Screwtapello merged 1 commit into
bsnes-emu:masterfrom
Screwtapello:dont-mess-with-stdlib-traits

Conversation

@Screwtapello

Copy link
Copy Markdown
Contributor

It seems that a lot of compilers implement a 128-bit integer type, but don't hook it up to all the standard library definitions. Previously, nall tried to amend the standard library definitions to match, but although that worked, it wasn't supposed to, and clang++ 20 apparently complains.

Although nothing in bsnes actually uses 128-bit integers for anything, it seems a shame to lose the functionality entirely, so we make our own traits, and adapt the serialization code to use it.

This patch was adapted from ares' commit 6a253b1.

It seems that a lot of compilers implement a 128-bit integer type, but don't
hook it up to all the standard library definitions. Previously, nall tried to
amend the standard library definitions to match, but although that worked,
it wasn't supposed to, and clang++ 20 apparently complains.

Although nothing in bsnes actually uses 128-bit integers for anything, it seems
a shame to lose the functionality entirely, so we make our own traits, and
adapt the serialization code to use it.

This patch was adapted from ares' commit 6a253b1.
@Screwtapello

Copy link
Copy Markdown
Contributor Author

It looks like the FreeBSD build failure is because of missing <cairo.h>, not related to this problem.

@Screwtapello
Screwtapello merged commit 479b6b8 into bsnes-emu:master Sep 27, 2026
4 of 5 checks passed
@Screwtapello
Screwtapello deleted the dont-mess-with-stdlib-traits branch September 27, 2026 07:00
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.

1 participant