Common type of ubyte and const ubyte is int
DrDread
DrDread at cheese.com
Thu May 2 16:25:15 UTC 2024
On Thursday, 2 May 2024 at 16:16:23 UTC, Steven Schveighoffer
wrote:
> On Thursday, 2 May 2024 at 12:34:03 UTC, Dom DiSc wrote:
>> [...]
>
> But let's take a step back. As far as integrals, they are *the
> same type*, it's just that one is const and one is not.
>
> There is no rule that says if the types are the same type
> except for type modifiers, what should happen. I think there
> should be.
>
> The result is very unexpected.
>
> -Steve
I'm for not having types promote at all. it's been an endless
source of bugs for me. it messes with metaprogramming.
More information about the Digitalmars-d
mailing list