On 09/04/2014 02:04 PM, monarch_dodra wrote:
> 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.
Yeah, there is something fishy with these operators.
Please see my other post. It seems like opIndex() is necessary or at
least more convenient.
Ali