auto ref is on the docket

Jesse Phillips via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 22 17:24:30 PDT 2015


On Monday, 22 June 2015 at 04:11:41 UTC, Andrei Alexandrescu 
wrote:
> Walter and I discussed what auto ref for templates should look 
> like and reached the conclusion that an approach based on 
> lowering would be best. I added a proposed lowering to 
> https://github.com/D-Programming-Language/dmd/pull/4717.
>
> Andrei

It seems to me that this may be an important target to seek:

auto foo(auto ref T bar) {}

Should be callable in the same manner

auto foo()(auto ref T bar) {}

is callable. That is to say it would be unfortunate if turning it 
into a template would cause different behaviors.

If nothing else, deviations should be well documented and 
explained.


More information about the Digitalmars-d mailing list