22 #ifndef Rcpp__sugar__tail_h
23 #define Rcpp__sugar__tail_h
28 template <
int RTYPE,
bool NA,
typename T>
36 start =
object.size() -
n ;
39 n =
object.size() -
start ;
44 return object[
start + i ] ;
46 inline R_xlen_t
size()
const {
return n; }
55 template <
int RTYPE,
bool NA,
typename T>
Tail(const VEC_TYPE &object_, R_xlen_t n_)
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
Rcpp::traits::storage_type< RTYPE >::type STORAGE
STORAGE operator[](R_xlen_t i) const
sugar::Tail< RTYPE, NA, T > tail(const VectorBase< RTYPE, NA, T > &t, R_xlen_t n)