Templates problem
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Sep 6 07:53:51 PDT 2016
On Tuesday, 6 September 2016 at 14:50:17 UTC, Lodovico Giaretta
wrote:
> From a quick look, it looks like `results` is a
> `const(TickDuration[3])`, that is a fixed-length array. And
> fixed-length arrays aren't ranges. If you explicitly slice
> them, they become dynamic arrays, which are ranges.
>
> So the solution is to call `map` with `results[]` instead of
> `results`.
exactly. static arrays doesn't have `popFront`, hence
`isInputRange` fails. yet there is no way to tell that to user,
so one should just learn what those cryptic error messages really
means.
or just get used to always slice arrays, it's cheap. ;-)
More information about the Digitalmars-d-learn
mailing list