rvalue references
deadalnix
deadalnix at gmail.com
Sat Apr 27 05:23:39 PDT 2013
On Saturday, 27 April 2013 at 11:11:05 UTC, Andrei Alexandrescu
wrote:
> On 4/27/13 2:37 AM, Manu wrote:
>> scope ref T func(scope ref T t) { return t; }
>>
>> I think this solves the problem.
>
> Consider:
>
> scope ref T func(scope ref T t) { return t; }
> scope ref T func2() { T t; return func(t); }
>
> Would be great if you went through all of the existing work on
> this. Well after you're done preparing your DConf talks :o).
>
>
> Andrei
Given the current way thing bind, scope bind to the function (ie
the implicit parameter here, probably) and not the return type.
That is annoying as hell, and getting into the way all the time.
More information about the Digitalmars-d
mailing list