[Rcpp-commits] r1517 - pkg/Rcpp/inst/include/Rcpp
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jun 11 15:01:06 CEST 2010
Author: romain
Date: 2010-06-11 15:01:06 +0200 (Fri, 11 Jun 2010)
New Revision: 1517
Modified:
pkg/Rcpp/inst/include/Rcpp/Vector.h
Log:
added a const version of Vector::operator[]
Modified: pkg/Rcpp/inst/include/Rcpp/Vector.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/Vector.h 2010-06-11 08:24:13 UTC (rev 1516)
+++ pkg/Rcpp/inst/include/Rcpp/Vector.h 2010-06-11 13:01:06 UTC (rev 1517)
@@ -702,6 +702,7 @@
inline iterator end() const{ return cache.get(size()) ; }
inline Proxy operator[]( const int& i ){ return cache.ref(i) ; }
+ inline Proxy operator[]( const int& i ) const { return cache.ref(i) ; }
inline Proxy operator()( const size_t& i) throw(index_out_of_bounds){
return cache.ref( offset(i) ) ;
}
@@ -1602,4 +1603,6 @@
}
+#include <Rcpp/operators/VectorOperators.h>
+
#endif
More information about the Rcpp-commits
mailing list