moveFront

Moves the front element of an input range.

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

moveFront
(
R
)
()

Parameters

R

Type of the range.

range R

Input range.

Return Value

Type: ElementType!R

The front element of the $(D_PSYMBOL range).

Examples

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

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

See Also

$(D_PSYMBOL move).

Meta