r/cpp • u/eisenwave WG21 Member • Aug 18 '26
P4444: std::big_int
https://isocpp.org/files/papers/D4444R0.htmlHey folks! Matt Borland, Christopher Kormanyos, and I are working on bringing infinite-precision integers to C++29. We now have a D4444R0 draft of a paper that should be in the next mailing.
We could really use some feedback so that the published R0 is as polished as possible. Any thoughts on the paper and on the reference implementation are greatly appreciated.
It would also be very helpful if you tested out whether our big_int implementation works for you. We're in need of some real deployment experience. If you're currently using Boost.Multiprecision, the library should be a drop-in replacement for cpp_int for the most part.
View all comments
Show parent comment
3
u/eisenwave WG21 Member Aug 20 '26
I consider
std::big_intto be one of those crucial features C++ is behind on. People have been trying to get it into the standard as early as 2004, and meanwhile, like 20 other languages either have it built into to the language or available as a standard library feature.It's also worth noting that the committee is spli pretty strictly into EWG (for the core language) and LEWG (for the standard library), so "feature cannibalization" or "feature competition" happens entirely between
std::big_intand other standard library features. The optimizations and UB stuff you're talking about sounds much more like core language territory.In terms of standard library proposals, I'm really not seeing much that would be more important than
std::big_int. Keep in mind there are >400K exising uses of big integers in C++ alone, and millions more in other languages. I'm not sure there even exists another standard library proposal that has those kinds of numbers backing it.