ref lost to opDispatch

Artur Skawina art.08.09 at gmail.com
Sat Jul 27 13:14:14 PDT 2013


On 07/27/13 18:23, Carl Sturtivant wrote:
> On Saturday, 27 July 2013 at 16:15:48 UTC, Carl Sturtivant wrote:
>>>   void opDispatch(string f, Args...)(auto ref Args args)
>>
>> What exactly is the effect of this? Does it make all of args ref parameters when instantiated?
>>
>> In which case it doesn't solve my real problem where I have more that 100 functions with all sorts of parameter lists being dispatched and I only want ref where it's prescribed.
>>
>> Is the behavior of the code I wrote a design feature or a bug?
> 
> And, can anyone please point me at the online documentation at the right place to tell me enough to infer what placing "auto ref" in front of the argument tuple does.

http://dlang.org/template.html#auto-ref-parameters

artur


More information about the Digitalmars-d-learn mailing list