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.

Reply via email to