Function moveAt

Moves the element at the position n out of the range.

ElementType!R moveAt(R) (
  R range,
  size_t n
)
if (isRandomAccessRange!R);

The moved element is left in a valid but unspecified state.

Parameters

NameDescription
R Range type.
range Random-access range.
n Element position.

Returns

The element at the position n.

See Also

move.

Example

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

assert(moveAt(a[], 1) == 5);