core.checkedint added to druntime

Walter Bright via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun Jun 22 12:32:40 PDT 2014


On 6/22/2014 12:37 AM, "Nordlöw" wrote:
>> While being a very modest piece of code in and of itself, I believe this
>> offers a significant opportunity that both D compilers and user defined types
>> can exploit.
>
> I did this in C/C++ a while ago, out of which I have forgotten most of it :)
>
> https://github.com/nordlow/justcxx/blob/master/sadd.h
> https://github.com/nordlow/justcxx/blob/master/ssub.h
> https://github.com/nordlow/justcxx/blob/master/smul.h
>
> Tests are here:
> https://github.com/nordlow/justcxx/blob/master/t_ranged_and_saturated.cpp
>
> Maybe there's something more here that could give further ideas.
>
> Pick what you want.

Thank you, that's very generous.


More information about the Digitalmars-d-announce mailing list