Re: [Rd] R_ext/Altrep.h should be more C++-friendly

2018-10-10 Thread Romain Francois
Thank you, I updated my example package so that it works with both. https://github.com/romainfrancois/altrepisode/blob/96af0548a9ecc08701d119ea427e16940a82882b/src/altrepisode.h We

Re: [Rd] R_ext/Altrep.h should be more C++-friendly

2018-10-10 Thread Tierney, Luke
Thanks for the suggestion. Committed in R_devel. Best, luke On Mon, 8 Oct 2018, Michael Sannella wrote: > I am not able to #include "R_ext/Altrep.h" from a C++ file.  I think > it needs two changes: > > 1. add the same __cplusplus check as most of the other header files: >     #ifdef 

Re: [Rd] R_ext/Altrep.h should be more C++-friendly

2018-10-09 Thread Romain Francois
I successfully use this workaround in this package: https://github.com/romainfrancois/altrepisode (which is just my way to get familiar with altrep, nothing serious) > Le 9 oct. 2018 à 17:00, Gabe Becker a écrit : > > Michael, > > Thanks for reaching out. This was brought up by Romaine

Re: [Rd] R_ext/Altrep.h should be more C++-friendly

2018-10-09 Thread Gabe Becker
Michael, Thanks for reaching out. This was brought up by Romaine Francois offline to me as well. What he does as a workaround is #define class klass extern "C" { #include } #undef class While we consider changing Altrep.h, the above should work for you in the immediate term. Let me know

[Rd] R_ext/Altrep.h should be more C++-friendly

2018-10-09 Thread Michael Sannella via R-devel
I am not able to #include "R_ext/Altrep.h" from a C++ file. I think it needs two changes: 1. add the same __cplusplus check as most of the other header files: #ifdef __cplusplus extern "C" { #endif ... #ifdef __cplusplus } #endif 2. change the line