RFC: scope and borrowing
via Digitalmars-d
digitalmars-d at puremagic.com
Tue Sep 23 03:23:55 PDT 2014
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.
More information about the Digitalmars-d
mailing list