MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / check_index

Method check_index

inst/include/Rcpp/vector/traits.h:93–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91 VECTOR* p ;
92
93 void check_index(R_xlen_t i) const {
94#ifndef RCPP_NO_BOUNDS_CHECK
95 if (i >= p->size()) {
96 warning("subscript out of bounds (index %s >= vector size %s)", i, p->size()); // #nocov
97 }
98#endif
99 }
100 } ;
101
102 // regular types for INTSXP, REALSXP, ...

Callers

nothing calls this directly

Calls 2

warningFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected