VRP and signed <-> unsigned conversion

Commander Zot no at no.no
Wed Dec 15 15:32:29 UTC 2021


On Wednesday, 15 December 2021 at 14:39:09 UTC, Steven 
Schveighoffer wrote:

> 1. Does it make sense for this to be valid? Should we reexamine 
> unsigned <-> signed implicit casting?
> 2. If the above rewrite is possible, shouldn't VRP just allow 
> this conversion? i.e. a type that has an unsigned/signed 
> counterpart should be assignable if the signed/unsigned can 
> accept the range.
>
> -Steve

number 1.
if a conversion cannot be proven to not truncate it should 
require a cast.


More information about the Digitalmars-d mailing list