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/
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to