{"action":"created","issue":{"url":"https://api.github.com/repos/RcppCore/Rcpp/issues/402","labels_url":"https://api.github.com/repos/RcppCore/Rcpp/issues/402/labels{/name}","comments_url":"https://api.github.com/repos/RcppCore/Rcpp/issues/402/comments","events_url":"https://api.github.com/repos/RcppCore/Rcpp/issues/402/events","html_url":"https://github.com/RcppCore/Rcpp/issues/402","id":118698285,"number":402,"title":"Headers generated from interfaces uses invalid C++ when exported name has dot","user":{"login":"jackwasey","id":7832270,"avatar_url":"https://avatars.githubusercontent.com/u/7832270?v=3","gravatar_id":"","url":"https://api.github.com/users/jackwasey","html_url":"https://github.com/jackwasey","followers_url":"https://api.github.com/users/jackwasey/followers","following_url":"https://api.github.com/users/jackwasey/following{/other_user}","gists_url":"https://api.github.com/users/jackwasey/gists{/gist_id}","starred_url":"https://api.github.com/users/jackwasey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackwasey/subscriptions","organizations_url":"https://api.github.com/users/jackwasey/orgs","repos_url":"https://api.github.com/users/jackwasey/repos","events_url":"https://api.github.com/users/jackwasey/events{/privacy}","received_events_url":"https://api.github.com/users/jackwasey/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-24T20:40:16Z","updated_at":"2015-11-26T07:25:31Z","closed_at":"2015-11-25T18:02:33Z","body":"The attributes vignette describes how to name a function using \r\n`// [[Rcpp:export(name=\"something.dot\")]]`\r\nallowing use of `.` prefix or S3 methods. However, when\r\n`// [[Rcpp::interfaces(r, cpp)]]`\r\nis used, the generated header file uses the exported name (perhaps correctly), but when an S3 method is exported, the header includes things like:\r\n```\r\n    inline List rcpp.dot() {\r\n      typedef SEXP(*Ptr_rcpp.dot)();\r\n```\r\nwhich don't compile.\r\n\r\nTo replicate:\r\n```\r\nRcpp.package.skeleton()\r\n```\r\nThen change the attributes in `src/rcpp_hello_world.cpp` to:\r\n```\r\n// [[Rcpp::interfaces(r, cpp)]]\r\n// [[Rcpp::export(name=\"rcpp.dot\")]]\r\n```\r\nThen attempt to compile. I used `devtools::load_all()`. Without `// [[Rcpp::interfaces(r, cpp)]]` it compiles fine.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/RcppCore/Rcpp/issues/comments/159834472","html_url":"https://github.com/RcppCore/Rcpp/issues/402#issuecomment-159834472","issue_url":"https://api.github.com/repos/RcppCore/Rcpp/issues/402","id":159834472,"user":{"login":"eddelbuettel","id":673121,"avatar_url":"https://avatars.githubusercontent.com/u/673121?v=3","gravatar_id":"","url":"https://api.github.com/users/eddelbuettel","html_url":"https://github.com/eddelbuettel","followers_url":"https://api.github.com/users/eddelbuettel/followers","following_url":"https://api.github.com/users/eddelbuettel/following{/other_user}","gists_url":"https://api.github.com/users/eddelbuettel/gists{/gist_id}","starred_url":"https://api.github.com/users/eddelbuettel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddelbuettel/subscriptions","organizations_url":"https://api.github.com/users/eddelbuettel/orgs","repos_url":"https://api.github.com/users/eddelbuettel/repos","events_url":"https://api.github.com/users/eddelbuettel/events{/privacy}","received_events_url":"https://api.github.com/users/eddelbuettel/received_events","type":"User","site_admin":false},"created_at":"2015-11-26T07:25:31Z","updated_at":"2015-11-26T07:25:31Z","body":"That's Rcpp's slogan, isn't it?  ;-)"}}