-
-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Spring cleaning" of some ancient pre-processor directives #1363
Comments
Definitely. +1 |
Should we be able to insist on 'C++11 or newer' ? It is a large enough watershed that it could lead to more cleanup. (Still noodling in |
R does not support C++98 anymore (since v4.0.0). If you request it, R throws an error. So everything on CRAN compiles with at least C++11. I think it's safe to remove any older bits. |
Yep that is what I thought. I started slowly (as I accidentally removed one line too many at the start) and carefully but now added an actual error if it is not at C++11. Stating that as a baseline will make future incremental commits easier. First commit coming in a minute. Maybe keep an eye on them and eyeball as I go along. |
"Because we can" our CI matrix go further back than R 4.0.0 so that version is actually now our baseline provided C++11 is opted into but of course as needed we can also remove some of the older checks. Will learn more about that as we go along. |
🙄 Well that didn't work out. Bails well into the 4.* series. PS I was too optimistic about |
This sounds good to me. Maybe to make part of Rcpp 1.1.0, with C++11 now being the minimum supported standard? I'd love to tear out all of that generated code bloat. |
That's the plan! |
Include file inst/include/Rcpp/platform/compiler.h contains a number of ancient tests ("is gcc newer than 4.5 ?") that we should be able to simplify. One approach may be to open a branch and to chip away carefully, building on last year's variadic templates cleanup. I suspect we can get rid of most if not even all these 'else' branches as current Rcpp versions are very unlikely to encounter a compiler than does not have a minimal C++11 fallback.
For example,
RCPP_USING_CXX0X_OR_LATER
is defined there, but used only in one file (inst/include/Rcpp/sugar/functions/sapply.h) where it provides a fallback fortypedef typename
via local pre-C++11 implementation. That else case can likely be removed. By going carefully we may be able to get some simplifications in.Thoughts?
The text was updated successfully, but these errors were encountered: