RIntVector.opSlice

Returns a reference to a slice of an RIntVector as a new RIntVector.

For efficiency purposes, opSlice holds a reference to the data, so what happens if the original RIntVector is unprotected is undefined behavior.
struct RIntVector
opSlice
(
int i
,
int j
)

Examples

auto v = RIntVector([1, 2, 3, 4, 5]);
RVector y = v[0..2]; // holds [1, 2]

Meta