Function moveFront

Moves the front element of an input range.

ElementType!R moveFront(R) (
  R range
)
if (isInputRange!R);

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

Parameters

NameDescription
R Type of the range.
range Input range.

Returns

The front element of the range.

See Also

move.

Example

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

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