Re: Seeking Endorsement: Boost.int128
Matt Borland via Boost <[email protected]>
| Newsgroups | gmane.comp.lib.boost.devel |
|---|---|
| Message-ID | <M8CO_sbzpL-AaD5WTiZas3DboK4gaJDdbtIu2pi5rbbUDtdr9zanBXUzXEQM7F8PSiUEJ-5CBHORbvn1arxE0ymWUq-9c2W9p-XKI3981sY=@mattborland.com> |
On Tuesday, April 28th, 2026 at 2:04 PM, Peter Dimov <[email protected]> wrote: > Matt Borland wrote: > > > > > How does this relate to / interact with __(u)int128_t? > > > > > > If __(u)int128_t exists, then all operators between those types and the > > boost.int128 types are defined: construction, conversion, add, sub, mul, div, > > etc. Same case if you have MSVC's std::_Unsigned128 or std::_Signed128 as > > the "builtin" 128-bit type. The alignment of the boost.int128 types is also set > > to match the builtin types when they exist. Internally, the boost.int128 types > > are a struct of two 64-bit integers regardless of the platform. > > What do the operations actually do, though? Does adding boost::uint128, > when __uint128_t exists, use __uint128_t addition, or does it continue to > use the library implementation? > > Similarly, for mixed mode; what does adding boost::uint128 and __uint128_t > do under the hood? (And what is the return type? I assume boost::uint128?) > In all cases the return type is a boost::uint128 for consistency. Yes, this is typically implemented by casting both types to builtin and then casting the result back to uint128. Matt _______________________________________________ Boost mailing list -- [email protected] To unsubscribe send an email to [email protected] https://lists.boost.org/mailman3/lists/boost.lists.boost.org/ Archived at: https://lists.boost.org/archives/list/[email protected]/message/LBNT44S5ZBBGLXG2G7ZYZH46CBIO54GG/
publickey - [email protected] - 0xC1382EAD.asc
(application/pgp-keys, 653 B)
-----BEGIN PGP PUBLIC KEY BLOCK----- xjMEX2wgdBYJKwYBBAHaRw8BAQdAUHOh0KpbZCszhdvKztWj4C6FR1ozMBQE waBi3m2PJHLNK21hdHRAbWF0dGJvcmxhbmQuY29tIDxtYXR0QG1hdHRib3Js YW5kLmNvbT7CjwQQFgoAIAUCX2wgdAYLCQcIAwIEFQgKAgQWAgEAAhkBAhsD Ah4BACEJEFmBWlVCFaWlFiEEwTgurTcoHwbdSbIsWYFaVUIVpaVWuwEA77rm OA4TB6Xxe6q8gI42bEICMhMyZKSMcakz39/djYkBAMJOG+IGQC/d0n3dsl10 Kg/oxX88kFO1oPKn4/XW+ToBzjgEX2wgdBIKKwYBBAGXVQEFAQEHQOsmo6wR UuXRAvFIiqmQkzYrPyvKYKna2z4ZtmnTQMkMAwEIB8J4BBgWCAAJBQJfbCB0 AhsMACEJEFmBWlVCFaWlFiEEwTgurTcoHwbdSbIsWYFaVUIVpaWUJwEA5G0c ZRnG5WGNErI+y90iQrTv02i4Ivhv7twoFcLD/zwA/jKypw+vehE99mEj1/uI EkoDFlNzQZqNldbjRcPyI5UH =462S -----END PGP PUBLIC KEY BLOCK-----
signature.asc
(application/pgp-signature, 343 B)
-----BEGIN PGP SIGNATURE----- Version: ProtonMail wrsEARYKAG0FgmnxA3YJEFmBWlVCFaWlRRQAAAAAABwAIHNhbHRAbm90YXRp b25zLm9wZW5wZ3Bqcy5vcmcMzERiVU2VDmc/W2KY8IaXoJ+L38Jw+x6IB8XR oB0o1hYhBME4Lq03KB8G3UmyLFmBWlVCFaWlAABovQD/RvA8mVXrr2UYbis2 8NhyxumwqpFDp0Vuo2ZOJRbN66IBALQf8s+7/gED+RisptTx7v70WAxa2zqG 9oBWUEXoUDYH =SFy1 -----END PGP SIGNATURE-----