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:
inline List rcpp.dot() {
typedef SEXP(*Ptr_rcpp.dot)();
which don't compile.
To replicate:
Then change the attributes in src/rcpp_hello_world.cpp to:
// [[Rcpp::interfaces(r, cpp)]]
// [[Rcpp::export(name="rcpp.dot")]]
Then attempt to compile. I used devtools::load_all(). Without // [[Rcpp::interfaces(r, cpp)]] it compiles fine.
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.