<div dir="ltr">Can the following be simplified?<div><br></div><div>(Typed in email, so not live code.)</div><div><br></div><div>// [[Rcpp::export]]</div><div>void func(SEXP x)</div><div>{</div><div>  XPtr<aType> y(x);</div>

<div>  func2(&*y);</div><div>  y->memfunc();</div><div>}<br></div><div><div><br></div><div>Is there a way to avoid the need to construct the XPtr in the 1st line? Hoping for:</div><div><br></div><div><div>// [[Rcpp::export]]</div>

<div>void func(aType* x)</div><div>{</div><div>  func2(x);<br></div><div>  x->memfunc();</div><div>}</div></div><div><br></div><div>THK</div><div><br></div>-- <br>Timothy H. Keitt<br><a href="http://www.keittlab.org/" target="_blank">http://www.keittlab.org/</a><br>


</div></div>