moveAt

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

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

moveAt
(
R
)
(,
size_t n
)

Parameters

R

Range type.

range R

Random-access range.

n size_t

Element position.

Return Value

Type: ElementType!R

The element at the position n.

Examples

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

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

See Also

$(D_PSYMBOL move).

Meta