So what does (inout int = 0) do?

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 15 11:26:53 PDT 2016


On 04/15/2016 02:24 PM, jmh530 wrote:
> I had not realized that the main reason that inout was added was because
> of not being able to use templates as virtual functions in classes.

The main reason is actually avoiding code duplication is such situations 
(i.e. the problem has a solution just not ideal). -- Andrei


More information about the Digitalmars-d mailing list