RVector.opSlice

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

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

Examples

auto v = RVector([1.1, 2.2, 3.3, 4.4, 5.5]);
RVector y = v[0..2]; // holds [1.1, 2.2]

Meta