So what does (inout int = 0) do?

Vladimir Panteleev via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 14 20:38:52 PDT 2016


On Friday, 15 April 2016 at 03:10:12 UTC, Andrei Alexandrescu 
wrote:
> Consider:
>
> https://github.com/D-Programming-Language/phobos/blob/master/std/range/primitives.d#L152
>
> There is no explanation to it in the source code, and the line 
> blames to 
> https://github.com/D-Programming-Language/phobos/pull/2661 
> (irrelevant).

I heard that sometimes git blame can track moving data between 
files, but this is not such a case.

You can continue the blame by blaming the old path starting from 
the commit preceding that one:

git blame c828a08b64de067eeb2ddcad8fed22b2cd92e438^ -- range.d

> Commenting it out yields a number of unittest compilation 
> errors, neither informative about the root of the problem and 
> indicative as to how the parameter solves it.

I'm not sure what errors you saw but the first one is that this 
fails:

     static assert( isInputRange!(inout(int)[]));

git blame on this line points to:

https://issues.dlang.org/show_bug.cgi?id=7824


More information about the Digitalmars-d mailing list