stream interfaces - with ranges
Mehrdad
wfunction at hotmail.com
Fri May 18 09:21:42 PDT 2012
On Friday, 18 May 2012 at 16:16:21 UTC, Steven Schveighoffer
wrote:
> No, by range of T[] I mean this:
>
> static assert(isInputRange!Range && is(ElementType!Range ==
> T[]));
>
> -Steve
Yes, I believe I understood it correctly...
In the case of ReadFileScatter, each T[] has the size of (at
most) 1 page.
In the case of a random linked list, each T[] has the size of 1
element.
Hence you can represent both of them as "a range of T[]", but
really, that's just trying to fit it into a mold instead of
creating the mold based on the actual thing.
What it *really* is is just a discontiguous buffer...
More information about the Digitalmars-d
mailing list