So what does (inout int = 0) do?

Nick Treleaven via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 16 03:48:46 PDT 2016


On 15/04/2016 04:10, Andrei Alexandrescu wrote:
> 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.
...
> 2. There needs to be documentation for people working on the standard
> library so they don't need to waste time on their own discovery process.

Perhaps use this, at least for now:

// <Workaround explanation>
alias InOutParam = inout int;

...
     (InOutParam)
     {
         ...
     }

It's less cryptic at the use-site and people can lookup the definition 
to find an explanation.


More information about the Digitalmars-d mailing list