C++ Logo

std-proposals

Advanced search

Re: [std-proposals] CHAR_BIT == 8 p3635r0

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Tue, 1 Jul 2025 10:03:27 -0400
On Tue, Jul 1, 2025 at 1:12 AM Thiago Macieira via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> On Monday, 30 June 2025 06:01:34 Pacific Daylight Time Matthew Taylor via Std-
> Proposals wrote:
> > they are permanently on C++98/03 and so there is little point in changing
> > how we design C++26 or C++29 to account for them.
>
> But unless the architectures themselves are end-of-lifed, we can't guess the
> future. There could be a point when there's a requirement from their users to
> update, but that can only happen if it is still possible.
>
> In any case, how does the standard change in any way by requiring 8-bit bytes?

It's more that standardizing it would change the thinking *around* the language.

At present, C++ could be said to consist of 2 conceptual languages:
the literal text of the standard, and the language "for all practical
purposes". There's a fair amount of stuff that one can do with C++ on
all "normal" implementations which is not guaranteed by the standard.
One of the reasons for adding things like implicit object creation is
to bring more of the "for all practical purposes" code into compliance
with the literal text of the standard.

For all practical purposes, a byte is 8 bits, and people write code
every day on that assumption. But that's not what the literal text
says that the language is, so all of that code is hypothetically
implementation-dependent (but not practically). So standardizing 8-bit
bytes would be another step towards merging these two conceptual
languages.

Received on 2025-07-01 14:03:40