C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Restrict possible values of CHAR_BIT
From: Thiago Macieira (thiago_at_[hidden])
Date: 2019-10-28 11:10:14


On Monday, 28 October 2019 08:47:26 PDT Arthur O'Dwyer via Std-Proposals
wrote:
> I also wonder what such a machine would do with `char8_t`, or character
> processing in general. (I mean, it could just waste half of the space in
> each 16-bit word; but it seems like it would be easier to just store two
> C++ "bytes" in each 16-bit word.)

You can do that, if you also shift the pointer addresses left and add an extra
bit to indicate whether you meant the lower or upper half of each word. And
correspondingly allowed dereferencing of each unit, individually.

Obviously, atomic_uint8_t, atomic_char, atomic_uchar, atomic_char8_t would not
exist.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel System Software Products

STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups