On Thursday, 4 September 2014 at 19:12:27 UTC, Ali Çehreli wrote:
The documentation says "To overload a[], simply define opIndex with no parameters":

  http://dlang.org/operatoroverloading.html#Slice

And it works with some uses of a[]. However, opSlice() seems to be needed to actually use the returned slice further.

This must be new, as I've read that page several times, and have never seen that before. Furthermore, I've done a *lot* pulls to improve ranges' slicing capabilities, and no reviewer has ever mentioned this before.

Reply via email to