[Rcpp-devel] Ease passing pointers
Can the following be simplified?
(Typed in email, so not live code.)
// [[Rcpp::export]]
void func(SEXP x)
{
XPtr<aType> y(x);
func2(&*y);
y->memfunc();
}
Is there a way to avoid the need to construct the XPtr in the 1st line?
Hoping for:
// [[Rcpp::export]]
void func(aType* x)
{
func2(x);
x->memfunc();
}
THK
Timothy H. Keitt http://www.keittlab.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20131231/d5bbc5cb/attachment.html>