auto ref is on the docket

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Sun Jun 21 22:08:43 PDT 2015


On 6/22/15 12:11 AM, Andrei Alexandrescu wrote:
> Walter and I discussed what auto ref for templates

You mean *non-templates*? auto ref for templates has a very well defined 
meaning.

And reading your post, I'm unclear what exactly happens. Does this 
generate 2 functions from one, and then call the wrapper for auto-ref?

So for instance:

ref int fun(auto ref int x);

What happens here?

auto x = &fun;
x(5);

-Steve



More information about the Digitalmars-d mailing list