[Rcpp-devel] slight gotcha in signature of constructors of classes to be exposed as Rcpp modules
bates at stat.wisc.edu
Mon Jul 11 18:00:57 CEST 2011
I discovered that there is a difference between a constructor with the signature
Foo(const NumericVector& ff);
and one with the signature
(other than the obvious differences in const'edness) if the class Foo
is to be exposed as an Rcpp module. The second version works as
expected. The first doesn't. I imagine it has to do with the
argument disappearing going out of scope before the reference is used.
Like Dirk, however, I feel that the innards of the module code are
above my pay grade and am only speculating.
More information about the Rcpp-devel