[OT] The Usual Arithmetic Confusions

forkit forkit at gmail.com
Thu Feb 17 21:15:50 UTC 2022


On Thursday, 17 February 2022 at 20:55:38 UTC, forkit wrote:
>

e.g.

This code would not compile:

(dic = disable implicit conversions)

// --

module test;
@safe:

import std;

void main()
{
     uint x = 4294967295;
     foo(x);
}


@dic void foo (int i)
{
     writeln(i); // will print -1 if this was allowed to compile.
}

// ---



More information about the Digitalmars-d mailing list