InputStreamRange

A struct that, when initialized with an input stream, acts as a Phobos-style input range for elements of the same type.

struct InputStreamRange (
S
E = StreamType!S
) if (
isInputStream!(S, E)
) {}

Constructors

this
this(S stream)

Constructs this range using a reference to a stream.

Members

Functions

empty
bool empty()

Determines if the stream is empty. We consider a stream as empty when reading from it returns a result of 0 elements.

front
E front()

Gets the last-read element from the stream.

popFront
void popFront()

Pops the last-read element from the stream, and buffers the next one so that calling front() will return the next element.

Meta