Vector.atCopy

Returns a copy to the element at position pos.

struct Vector
scope
atCopy
(
this This
)
(
const size_t pos
)

Examples

Vector!(int, 6) vec = Vector!(int, 6).build(1, 2, 3, 4, 5, 6);

assert(vec.atCopy(3) == 4);
assert(vec.atCopy(vec.length-1) == 6);

Meta