is array an InputRange?

Nathan M. Swan nathanmswan at gmail.com
Fri Oct 5 17:38:54 PDT 2012


On Friday, 5 October 2012 at 13:39:56 UTC, ref2401 wrote:
> import std.range;
>
> int[] numbers = [1, 3, 5, 7, 9, 11];
>
> auto rangeObject = inputRangeObject(numbers);
> auto inputRange = cast(InputRange!(int[]))rangeObject;
>
> why does 'inputRange' equal null?

Suggested reading:

http://ddili.org/ders/d.en/ranges.html

Forget about the std.range objects.

NMS


More information about the Digitalmars-d-learn mailing list