C++ Logo

sg16

Advanced search

Re: [isocpp-sg16] Thoughts on P4030R0: Endian Views

From: Jens Maurer <jens.maurer_at_[hidden]>
Date: Sun, 21 Jun 2026 12:00:53 +0200
On 6/21/26 08:54, Tom Honermann via SG16 wrote:
> std::byteswap() ([bit.byteswap] <https://eel.is/c++draft/bit.byteswap#lib:byteswap>) does not have differentiated behavior based on CHAR_BIT,

And that's fine; a "byte" is defined as a "char" in C++,
so it's meaningful to talk about byte-swapping a 36-bit
"int" on a platform where CHAR_BIT == 9.

Jens

Received on 2026-06-21 10:00:58