MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / operator[]

Method operator[]

inst/include/Rcpp/Dimension.h:63–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 }
62
63 inline reference operator[](int i){
64 if( i < 0 || i>=static_cast<int>(dims.size()) ) throw std::range_error("index out of bounds") ;
65 return dims[i] ;
66 }
67 inline const_reference operator[](int i) const{
68 if( i < 0 || i>=static_cast<int>(dims.size()) ) throw std::range_error("index out of bounds") ;
69 return dims[i] ;

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected