[Rcpp-devel] #ifdef'd out // [[Rcpp::export]]

JJ Allaire jj.allaire at gmail.com
Sun Feb 24 23:04:59 CET 2013


> would it be possible to output the added code fragments, e.g.,
> ----
> RcppExport SEXP sourceCpp_7387_none_in_lots_out() {
> BEGIN_RCPP
>     Rcpp::RNGScope __rngScope;
>     point_l __result = none_in_lots_out();
>     return Rcpp::wrap(__result);
> END_RCPP
> }
> ----
> immediately following the "// [[Rcpp::export]]" line?  (rather than
> waiting till the end of the file.)
>

We don't re-write the file because we want the gcc error messages to
correspond to the same lines of the file that the user sees in their
editors. Writing the shims at the bottom of the file provides this (very
desirable) behavior.

We could get into the business of tracking offsets of injected chunks and
re-writing the gcc error messages, but we'd only do this if there was a
huge payoff in user convenience/effectiveness which I don't see at this
point.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130224/8d162e1d/attachment.html>


More information about the Rcpp-devel mailing list