I discovered that there is a difference between a constructor with the signature
Foo(const NumericVector& ff);
and one with the signature
Foo(NumericVector);
(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.