Formal Review of std.range.ndslice
Ilya Yaroshenko via Digitalmars-d
digitalmars-d at puremagic.com
Wed Nov 18 02:53:32 PST 2015
On Wednesday, 18 November 2015 at 10:18:37 UTC, Nordlöw wrote:
> On Tuesday, 17 November 2015 at 18:38:14 UTC, Ilya Yaroshenko
> wrote:
>>> AFAIK, if all the slice dimensions are know at compile-time
>>> it should. This is kind of similar to how std.range.chain()
>>> works.
>>
>> Thanks! Implemented:
>> http://dtest.thecybershadow.net/artifact/website-7a646fdea76569e009844cdee5c93edab10980ca-4f243752aee5ecc098ce1c36eedd86a2/web/phobos-prerelease/std_experimental_range_ndslice.html#byElement
>>
>> --Ilya
>
> I don't see any other checks using `isRandomAccessRange`.
> Surely there must be other ranges/algorithms in ndslice that
> should propagate random access, right?
Only Slice and ByElements has random access. Special check was
added for internal PtrShell, however it is commented with
`version(none)` because it works only with git compiler (I have
fixed std.internal.test.dummyrange ).
There was check using `isRandomAccessRange` after range
primitives in Slice. I have added `hasLength` and `hasSlicing`
too
https://github.com/D-Programming-Language/phobos/commit/919009dce8903eca1ded119036ed5b2dd5bfcaa5
Updated docs:
http://dtest.thecybershadow.net/artifact/website-7a646fdea76569e009844cdee5c93edab10980ca-3429854b54bfa5eb7060de221b45056f/web/phobos-prerelease/std_experimental_range_ndslice.html
-- Ilya
More information about the Digitalmars-d
mailing list