primitive value overflow

luka8088 luka8088 at owave.net
Thu May 16 13:39:16 PDT 2013


On 16.5.2013. 22:29, Andrej Mitrovic wrote:
> 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.

Yes, thanks for the advice, I did something similar. =)



More information about the Digitalmars-d mailing list