DIP69 - Implement scope for escape proof references

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Fri Dec 12 16:59:19 PST 2014


On Saturday, 13 December 2014 at 00:52:46 UTC, Walter Bright 
wrote:
> On 12/12/2014 4:07 PM, deadalnix wrote:
>> On Saturday, 13 December 2014 at 00:06:18 UTC, Walter Bright 
>> wrote:
>>> How not?
>>
>> scope a = new Stuff();
>> scope b = a;
>>
>> auto rc1 = RC(a);
>> auto rc2 = RC(b);
>>
>> // Enjoy the free when it comes !
>
> What's the type signature of RC ?

RCWrapper!T RC(T)(scope T t) or somethign along these lines.


More information about the Digitalmars-d mailing list