IndexMixin.relocateFront

Moves moveme.front to the position before tohere.front and inc both ranges. Probably not safe to use either range afterwards, but who knows. Preconditions: moveme and tohere are both ranges of the same container. Postconditions: moveme.front is incremented Complexity: O(1)

mixin template IndexMixin(size_t N, alias Range_0)
void
relocateFront
(
PosRange
)
(
ref PosRange moveme
,
PosRange tohere
)
if (
is(ElementType!PosRange == Position!(ThisNode)) ||
is(PosRange == SeqRange)
)
in { static if (is(PosRange == SeqRange)) { assert (moveme.c == tohere.c); assert (moveme.front_node); assert (tohere.front_node); } else { assert (moveme.front.node); assert (tohere.front.node); } }

Meta