RFC: scope and borrowing

Manu via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 23 04:23:45 PDT 2014


On 23 September 2014 20:23, via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On Tuesday, 23 September 2014 at 09:46:17 UTC, Walter Bright wrote:
>>
>> Have you tried auto ref?
>
>
> For some purposes, auto ref does the wrong thing. Whether you get a
> reference depends on whether you pass an lvalue or an rvalue. But some
> templates need to take either a struct by reference, or a class/interface
> (already being a reference) by value.
>
> This is the case deadalnix mentioned further up in this thread. I don't know
> whether it applies to Manu's code, too. AFAIUI he's more concerned about
> forwarding parameters in wrapper types.

That's just in this case. I'm concerned with many different cases over
time. This is a half decade running agony for me ;)


More information about the Digitalmars-d mailing list