On 12/4/14 3:41 PM, Walter Bright wrote:
On 12/4/2014 4:03 AM, Martin Nowak wrote:
Will it be possible to deduce, that the lifetime of that scoped value
is tied to
the smart pointer?

   struct RefCounted(T)
   {
     T t;
     scope ref T borrow() { return t; }
     alias this t;
   }

This enables RefCounted!T to be implicitly converted to a T, but with a
scoped result. This is a critical feature, one I spent a lot of time
thinking about, and hope it's right :-)

Hm... did you mean `alias this borrow`?

-Steve


Reply via email to