rvalue references

Zach the Mystic reachzach at gggggmail.com
Sat Apr 27 09:13:21 PDT 2013


On Saturday, 27 April 2013 at 06:37:38 UTC, Manu wrote:
> scope ref T func(scope ref T t) { return t; }
>
> I think this solves the problem.

struct S {
   scope ref S func() { return this; }
}

Does 'scope' apply to the return value or to the hidden 'this' 
parameter? Or both? I think it makes a difference...


More information about the Digitalmars-d mailing list