primitive value overflow

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu May 16 13:29:11 PDT 2013


On Thursday, 16 May 2013 at 20:24:31 UTC, luka8088 wrote:
> Hello everyone.
>
> Today I ran into a interesting issue. I wrote
>
>   auto offset = text1.length - text2.length;

Yeah, I don't like these bugs either. In the meantime you can 
swap auto with 'sizediff_t' or 'ptrdiff_t', and then you can 
check if it's non-negative.


More information about the Digitalmars-d mailing list