IndexMixin.relocateBack

Moves moveme.back to the position after tohere.back and dec 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.back is decremented Complexity: O(1)

mixin template IndexMixin(size_t N, alias Range_0)
void
relocateBack
(
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.back_node); assert (tohere.back_node); } else { assert (moveme.back.node); assert (tohere.back.node); } }

Meta