Skip to content

Conversation

@Sodex
Copy link

@Sodex Sodex commented Jan 13, 2026

Add an implicit converting constructor for uint (N >= 128) from builtin_uint128 so that uint256{__uint128_t} / static_cast(__uint128_t) correctly zero-extend and preserve the high 64 bits instead of going through the variadic uint64_t-convertible ctor and truncating to 64 bits

Add an implicit converting constructor for uint<N> (N >= 128) from builtin_uint128 so that uint256{__uint128_t} / static_cast<uint256>(__uint128_t) correctly zero-extend and preserve the high 64 bits instead of going through the variadic uint64_t-convertible ctor and truncating to 64 bits
@sonarqubecloud
Copy link

@chfast
Copy link
Owner

chfast commented Jan 14, 2026

Looks good. Can you add a test case?

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.

2 participants