Re: [boost][int128] Formal Review Begins Today (July 22-July 31)

"pavlov.pavel--- via Boost" <[email protected]> Mon, 27 Jul 2026 12:05:56 -0000
Newsgroups gmane.comp.lib.boost.devel
Message-ID <[email protected]>
I've been using this `int128` lib for quite a while, way before `Decimal` was added to boost. At first, I wanted to use boost multiprecision for int128 support, but due to my specific use case it wasn't acceptable. In short, I wanted something that works as close as possible to regular int64_t/uint64_t but for 128-bit numbers (eg overflows/casting produce similar results, vars are 16 bytes in size etc).
I tried google's abseil (`absl::int128`/`absl::uint128` from `absl/numeric/int128.h`), `std::_Unsigned128`/`std::_Signed128` for msvc compiler (from their `__msvc_int128.hpp`), `__int128` in gcc/clang and some other libs. But at the end I had painful spaghetti mix of ifdefs and workarounds: in some cases `__in128` (or some operations with it) aren't available for clang/gcc, in some cases implementation of some functions clearly was inferior in one lib vs some other. I had some questions on [multiprecision github](https://github.com/boostorg/multiprecision/issues/666), that's where I found out about int128 lib. Initially, I added to the mix of code I had for 128bit math, but eventually I removed all of that and I use `boost::int128` directly now. I've been using it for a year for msvc/clang
 /gcc on win64/win32, gcc/clang on linux.
_______________________________________________
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/7KVV53KEHWBKRGESWEGR4EZSWXAPGZJ2/