ushort + ushort = int?

rikki cattermole rikki at cattermole.co.nz
Mon Aug 20 08:49:00 UTC 2018


On 20/08/2018 8:48 PM, Andrey wrote:
> On Monday, 20 August 2018 at 08:42:20 UTC, rikki cattermole wrote:
>> It's called integer promotion and it originates from C.
>> And yes C++ does have such support in some variant (I really don't 
>> feel like comparing the two).
> 
> And I should do? Always use "cast" operator when I operate not with ints?

Yes. On x86 int's will be faster just an FYI so it does make sense to 
use them for computation.


More information about the Digitalmars-d-learn mailing list