The difference between T[] opIndex() and T[] opSlice()

Paul Backus snarwin at gmail.com
Mon Oct 2 16:05:39 UTC 2023


On Sunday, 1 October 2023 at 17:41:08 UTC, Salih Dincer wrote:
> Hi,
>
> What is the difference between T[] opIndex() and T[] opSlice(), 
> which haven't parameters?

`T[] opSlice()` is the D1 version and exists only for backwards 
compatibility. You should use `T[] opIndex()` in new code.


More information about the Digitalmars-d-learn mailing list