Question about opSlice

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 17 09:29:37 PDT 2015


On Tuesday, 17 March 2015 at 13:57:18 UTC, Ilya Ivanov wrote:
[snip]

I recently did a full Array2D with slicing and non-contiguous 
views etc and found that it was quite a nightmare getting all 
this stuff correct.

I think your mistake is that opSlice needs to be a template to 
trigger the new-style slicing/indexing.
E.g.

opSlice(size_t dim)(size_t i, size_t j)


More information about the Digitalmars-d mailing list