auto ref escaping local variable

Manu via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 23 17:10:22 PST 2017


On 24 January 2017 at 10:52, Robert burner Schadek via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> I have this program that used to compile with 72 but with 73 dmd is
> complaining that
> "Error: escaping reference to local variable t"
>
> auto ref f2(T)(auto ref T t, auto ref T s) {
>         return t;
> }
>

Maybe:

auto ref f2(T)(return auto ref T t, auto ref T s) {
        return t;
}

??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20170124/2c203da4/attachment.html>


More information about the Digitalmars-d mailing list