A Refcounted Array Type

weaselcat via Digitalmars-d digitalmars-d at puremagic.com
Mon Feb 23 18:27:55 PST 2015


On Tuesday, 24 February 2015 at 02:06:07 UTC, Walter Bright wrote:
> On 2/23/2015 5:41 PM, weaselcat wrote:
>> On Monday, 23 February 2015 at 22:15:54 UTC, Walter Bright 
>> wrote:
>>>    ref E opIndex(size_t i) return // here's the magic
>>
>> exactly what is this doing? I don't see this explained in 
>> DIP25 at all.
>
> The 'this' is passed by reference. So the 'return' is really 
> 'return ref this', the rest is explained by DIP25.

Oh, I see. That makes a lot more sense.


More information about the Digitalmars-d mailing list