-
-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
Description
Currently, the get_indices()
functions (which are called in the constructor) do not validate the input sizes We should validate early that the right-hand side vector is either length 1, or same length as the left-hand side vector.
https://github.com/RcppCore/Rcpp/blob/master/inst/include/Rcpp/vector/Subsetter.h#L40
Note that we do perform this check when actually performing the subset (e.g. https://github.com/RcppCore/Rcpp/blob/master/inst/include/Rcpp/vector/Subsetter.h#L56-L66) but I think this is happening too late (we should validate before we do any work)
Metadata
Metadata
Assignees
Labels
No labels