[Rcpp-devel] exporting void test(void) function

Tim Keitt tkeitt at gmail.com
Tue Dec 31 21:04:56 CET 2013


On Tue, Dec 31, 2013 at 1:45 PM, JJ Allaire <jj.allaire at gmail.com> wrote:

> Am I correct in noting that
>>
>> // [[Rcpp::export]]
>> void test(void)
>> {
>>     // do something
>> }
>>
>> does not generate any code in RcppExports.R?
>>
>
> The problem occurs because the attributes parser doesn't know what to do
> with the void argument specification. If you declare the function with no
> argument specification at all then the function will be handled correctly
> in RcppExports.R, e.g.
>
> // [[Rcpp::export]]
> void foo() {
>
> }
>
>
Thanks. Thought I had tried it both ways, but I'll take your word for it.

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/330b0e24/attachment-0001.html>


More information about the Rcpp-devel mailing list