C++ Logo

std-proposals

Advanced search

Re: [std-proposals] D3666R0 Bit-precise integers

From: Tiago Freire <tmiguelf_at_[hidden]>
Date: Mon, 1 Sep 2025 18:47:18 +0000
My gripe with _BitInt is that it is made for an abstract machine that has no real world analogous.

ints don't have just size but also alignment properties.
what should the alignment of _BitInt(512) should be?
Should it align to the cache line? or should it align with the requirements for the largest implementable operand to save on space?


________________________________
From: Std-Proposals <std-proposals-bounces_at_[hidden]> on behalf of Jan Schultke via Std-Proposals <std-proposals_at_[hidden]>
Sent: Monday, September 1, 2025 8:03:08 PM
To: C++ Proposals <std-proposals_at_[hidden]>
Cc: Jan Schultke <janschultke_at_[hidden]>
Subject: [std-proposals] D3666R0 Bit-precise integers

Hey,

As some of you may already know, I am working on bringing bit-precise
integers (_BitInt) to C++. See a very early draft of the paper here:

https://isocpp.org/files/papers/D3666r0.html

The debate over whether _BitInt should be a fundamental type or
library type has been largely settled, however there are two other
contentious points:

1. C does not allow _BitInt(1); should C++ to make generic programming
more comfortable?
2. Should the _BitInt keyword exist in C++? I currently propose to
have it, mainly because it inevitably will exist as a compiler
extension or compatibility macro, and it seems pointlessly
user-hostile not to just standardize existing practice.

If you have some early feedback, especially feedback on these two
points, that would be appreciated.

You should expect the finished paper to be in the September mailing.


Jan
--
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2025-09-01 18:47:23