C++ Logo

liaison

Advanced search

Re: [isocpp-wg14/wg21-liaison] Standardizing a limb/word type (uint_maxfast_t/uint_word_t)

From: Nevin Liber <nevin_at_[hidden]>
Date: Sun, 23 Aug 2026 01:44:34 -0500
On Sun, Aug 23, 2026 at 12:25 AM Jan Schultke via Liaison <
liaison_at_[hidden]> wrote:

> When working on a draft of P4444 std::big_int (
> https://isocpp.org/files/papers/D4444R0.html#std::uint_multiprecision_t),
> we've stumbled upon the problem that C++ does not yet have a "word type"
> that would be suitable as the "limb type" for multiprecision.
>

Given that big int libraries have existed for a while, why is there a
pressing need now?


> That is, the largest possible unsigned integer type that has native
> arithmetic support.
>

What keeps this from suffering the same problems as intmax_t; i.e., once
baked into ABIs it is effectively impossible to change when the underlying
hardware does.


> I'm thus interested in standardizing a type alias in <stdint.h> that has
> the size. In P4444, we call that uint_multiprecision_t, but that's perhaps
> not universal enough. Names like "uint_maxfast_t" or "uint_word_t" come to
> mind.
>

I was never really enamoured with the int_fast*N*_t types, since they don't
guarantee, well, anything other than being at least *N* bits wide. This
doesn't seem any different, because "fast" isn't clearly defined.

What are your thoughts?


That we are re-inventing int, badly. The original *int*ention of int was
that it be the "fastest" type on the target, whatever that means.

Also, since I'm not in the C committee myself, is there anyone who is
> interested in championing a proposal on the WG14 side?
>

I am not interested, and this seems a bit premature.
-- 
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden] <nevin_at_[hidden]>>
+1-847-691-1404

Received on 2026-08-23 06:45:18