RetroIterator

Reverse directions for an iterator.

RetroIterator is used by retro.

Members

Aliases

__map
alias __map(alias fun) = RetroIterator__map!(Iterator, fun)

Functions

lightConst
auto lightConst()
lightImmutable
auto lightImmutable()
opBinary
ptrdiff_t opBinary(typeof(this) right)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(ptrdiff_t index)
Undocumented in source. Be warned that the author may not have intended to support it.
opCmp
ptrdiff_t opCmp(typeof(this) right)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(this) right)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
auto ref opIndex(ptrdiff_t index)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(ptrdiff_t index)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(ptrdiff_t index)
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
auto ref opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
void opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
void opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_iterator
Iterator _iterator;

Examples

IotaIterator!int iota;
RetroIterator!(IotaIterator!int) retro;

++iota;
--retro;
assert(*retro == *iota);

--iota;
++retro;
assert(*retro == *iota);

assert(retro[-7] == iota[7]);

iota += 100;
retro -= 100;
assert(*retro == *iota);

iota -= 100;
retro += 100;
assert(*retro == *iota);

assert(*(retro + 10) == *(iota - 10));

assert(retro - 1 < retro);

assert((retro - 5) - retro == -5);

iota = IotaIterator!int(3);
retro = RetroIterator!(IotaIterator!int)(iota);
assert(*retro == *iota);

Meta