temporary objects are not allowed to be pass by ref anymore

Jarrett Billingsley jarrett.billingsley at gmail.com
Sun Apr 19 09:39:19 PDT 2009


On Sun, Apr 19, 2009 at 8:41 AM, Denis Koroskin <2korden at gmail.com> wrote:
> What's a rationale behind an issue described bug 2621?
> http://d.puremagic.com/issues/show_bug.cgi?id=2621
>
> Why isn't it allowed anymore?
>
> It broke quite a lot of my code. And while it is fixable by doing
>
> auto tmp = someFunctionThatRetunsStruct();
> someMethodThatAcceptsStructByReference(tmp);
>
> it looks ugly and unnecessary.
>

Wow, that's pretty dumb.  I use that a lot too.



More information about the Digitalmars-d mailing list