Can't make inout work.

Paul Backus snarwin at gmail.com
Sat Mar 16 03:49:26 UTC 2019


On Friday, 15 March 2019 at 23:57:15 UTC, aliak wrote:
> Anyone knows how to make this work?

You need an explicit `inout` on the return value of `make`:

auto ref make(T)(inout auto ref T value) {
     return inout(S!T)(value);
}


More information about the Digitalmars-d-learn mailing list