Le 05/07/10 23:51, Jonathan Chang a écrit :
I noticed that for Rcpp::Vector there is no const () operator.  For
example,

double foo(const Rcpp::Vector<REALSXP>& bar) {  return bar(0); }

will fail.  Is there a workaround for this?  Thanks!

Cheers,
Jonathan

Hi,

Apart from using const_cast, I know of no workaround.
We should provide const versions. I've just added it on the TODO file.

Romain

--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://bit.ly/98Uf7u : Rcpp 0.8.1
|- http://bit.ly/c6YnCi : graph gallery collage
`- http://bit.ly/bZ7ltC : inline 0.3.5

_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to