Re: Trait hasIndexing

2016-10-11 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, October 11, 2016 10:08:02 Nordlöw via Digitalmars-d-learn wrote: > I can't find any traits `hasIndexing!R` corresponding to > `std.range.primitives.hasSlicing!R` > > that is `true` iff `R` has `opIndex[size_t]` defined. Is there > one? > > If not what should I use instead? The traits i

Re: Trait hasIndexing

2016-10-11 Thread Nordlöw via Digitalmars-d-learn
On Tuesday, 11 October 2016 at 10:08:02 UTC, Nordlöw wrote: I can't find any traits `hasIndexing!R` corresponding to `std.range.primitives.hasSlicing!R` My definition of `hasIndexing` so far: https://github.com/nordlow/phobos-next/blob/master/src/typecons_ex.d#L83

Trait hasIndexing

2016-10-11 Thread Nordlöw via Digitalmars-d-learn
I can't find any traits `hasIndexing!R` corresponding to `std.range.primitives.hasSlicing!R` that is `true` iff `R` has `opIndex[size_t]` defined. Is there one? If not what should I use instead?