ReversableRange

Range that allows to unify operations in forward and reverse directions without virtual function call overhead introduced by inputRangeObject.

reverseTransform is a function that will be applied to elements if range is iterated backwards.

Constructors

this
this(R range, bool reverse)

Construct reversable range.

Members

Functions

back
auto back()

Bidirectional range primitives

empty
bool empty()
front
auto front()

Bidirectional range primitives

length
size_t length()

If source range has length, the result also has length

opIndex
auto opIndex(size_t index)

If source range is a random access range, opIndex is defined

opSlice
auto opSlice(size_t from, size_t to)

Slicing is also propagated

popBack
void popBack()
popFront
void popFront()

Bidirectional range primitives

reverse
ReversableRange reverse()

Reverse of this range

save
auto save()

Bidirectional range primitives

Meta