Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upHeaders generated from interfaces uses invalid C++ when exported name has dot #402
Comments
|
That puts a second issue on @jjallaire 's plate... |
|
PR with a fix is here: #403 On Tue, Nov 24, 2015 at 7:54 PM, Dirk Eddelbuettel <notifications@github.com
|
|
Lovely, thank you! |
|
Lightning fast as always. Thanks. |
|
That's Rcpp's slogan, isn't it? ;-) |
The attributes vignette describes how to name a function using
// [[Rcpp:export(name="something.dot")]]allowing use of
.prefix or S3 methods. However, when// [[Rcpp::interfaces(r, cpp)]]is used, the generated header file uses the exported name (perhaps correctly), but when an S3 method is exported, the header includes things like:
which don't compile.
To replicate:
Then change the attributes in
src/rcpp_hello_world.cppto:Then attempt to compile. I used
devtools::load_all(). Without// [[Rcpp::interfaces(r, cpp)]]it compiles fine.