Deprecate implicit conversion between signed and unsigned integers
Nick Treleaven
nick at geany.org
Sun May 12 20:22:49 UTC 2024
On Sunday, 12 May 2024 at 20:20:10 UTC, Nick Treleaven wrote:
> `cast` can be bug-prone if the original type gets changed. It
> would be better to have druntime template functions `signed`
> and `unsigned` to do the casts with IFTI to avoid changing the
> size of the type.
I forgot, those already exist, at least in Phobos:
https://dlang.org/phobos/std_conv.html#.unsigned
More information about the dip.ideas
mailing list