moveBack

Moves the back element of a bidirectional range.

The back element is left in a valid but unspecified state. $(D_PSYMBOL moveBack) doesn't advances the range, so popBack should be probably called after this function.

Parameters

R

Type of the range.

range R

Bidirectional range.

Return Value

Type: ElementType!R

The back element of the $(D_PSYMBOL range).

Examples

// Has elements without a postblit constructor.
int[2] a = 5;

assert(moveBack(a[]) == 5);

See Also

$(D_PSYMBOL move).

Meta