`return const` parameters make `inout` obsolete

Nick Treleaven via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 17 05:02:15 PDT 2015

On 16/03/2015 14:17, Zach the Mystic wrote:
> char* fun(return const char* x);
> Compiler has enough information to adjust the return type of `fun()` to
> that of input `x`. This assumes return parameters have been generalized
> to all reference types. Destroy.

inout can be used for local variables too.

More information about the Digitalmars-d mailing list