On Monday, 7 July 2014 at 19:20:24 UTC, Fr wrote:
It's in the example above :

SortedRange!(MyObject[]) opSlice() { sequence[].array.assumeSorted; }

I thought that that using ".array" would lead to instantiating something.

Yes, this *will* instantiate an array and copy all of the items from the RedBlackTree into it. There's not really a way around it (unless you upgrade to 2.066 so assumeSorted will accept the result of sequence[] without having the intermediate array).

Reply via email to