Annoyance with new integer promotion deprecations

Walter Bright newshound2 at digitalmars.com
Sun Feb 18 23:57:17 UTC 2018


On 2/18/2018 1:17 PM, Martin Nowak wrote:
> Best solution, write a custom Int type that doesn't use C's horrible
> promotion rules.
> I've long wanted some SafeInt library that doesn't silently promote and
> supports saturation, overflow, and errors.

Doesn't https://dlang.org/phobos/std_experimental_checkedint.html do that? It 
supports saturation, overflow, errors, and has hooks for operators.


More information about the Digitalmars-d mailing list