C++ Logo

std-proposals

Advanced search

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

From: Christof Meerwald <cmeerw_at_[hidden]>
Date: Tue, 9 Sep 2025 22:00:21 +0200
On Mon, Sep 01, 2025 at 08:02:44PM +0200, Jan Schultke via Std-Proposals wrote:
> 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 paper mentions full C comaptibility, but is that really desirable?
Shouldn't we take the opportunity to tighten up on implicit
conversions for new types instead? And maybe push WG14 to do the same?

Do we really want 0wb to be a null pointer constant? Note that C++ is
already more strict than C for null pointer constants.

And is there a good use case for having implicit conversions from
floating point types to _BitInt?

I would be a lot happier if we limit support for _BitInt to the cases
that are actually useful, and try to prevent any (accidental) misuse.


Christof

-- 
https://cmeerw.org                             sip:cmeerw at cmeerw.org
mailto:cmeerw at cmeerw.org                   xmpp:cmeerw at cmeerw.org

Received on 2025-09-09 20:00:24