Possible, but unlikely.

 

What was first flexibility, turns into rigid convention.

 

short 16

int 32

long 64

long long 128

 

seems more likely
(if possible by the rules)


 

-----Ursprüngliche Nachricht-----
Von: Frederick Virchanza Gotham via Std-Proposals <std-proposals@lists.isocpp.org>
Gesendet: So 30.03.2025 18:22
Betreff: Re: [std-proposals] Type modifier to disable integer promotion
An: std-proposals@lists.isocpp.org;
CC: Frederick Virchanza Gotham <cauldwell.thomas@gmail.com>;
Jonathan wrote:
> This certainly looks like it's checking for promotion:
>
> std::is_same< uint_fast32_t, decltype(uint_fast32_t() + > > uint_fast32_t()) >


Yeah that's exactly what I meant.


Jonathan also wrote:
>> So anyway my code looks a little ridiculous in places
>> as I'm super-paranoid about stuff such as a 32-Bit
>> unsigned int promoting to a 64-Bit signed int.
>
> As discussed, there are no platforms in existence where that can happen,
> and that's unlikely to change.


You're saying there will never be a computer with a 64-Bit int?
Because on such a computer, a 32-Bit integer type (for instance 'short
unsigned') would promoted to a 64-Bit int.

Maybe in a decade or two we'll have computers as follows:

char - 8
short - 32
int - 64
long - 128
long long - 128
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals