Skip to content
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

CRAN asking for C++17 #194

Closed
aadler opened this issue Jan 31, 2023 · 6 comments
Closed

CRAN asking for C++17 #194

aadler opened this issue Jan 31, 2023 · 6 comments

Comments

@aadler
Copy link

aadler commented Jan 31, 2023

My package lamW depends on RcppParallel. Its results tab is now showing a note "Specified C++11: please update to current default of C++17". Is addressing this as simple as updatinge Makevars and Makevars.win to read CXX_STD = CXX17 or will that create issues? Thank you

@eddelbuettel
Copy link
Member

eddelbuettel commented Jan 31, 2023

  1. That's an ongoing conversation in several places, see eg my tweet here
  2. Nobody has (AFAIK) been asked to update a package, the check is not (AFAIK) "on" for uploads to CRAN. It's just that a few of use have seen the NOTE for our own packages.
  3. The note is in your package, and not in RcppParallel. So why do you ask here? Did you maybe mean to email rcpp-devel?
  4. Yes it is exactly that easy and Writing R Extensions is actually quite clear on it too. Also see for example thiss code search at GitHub's cran mirror for CXX_STD = CXX17; feel free to vary for CXX14 or CXX20.

In short, "it's all good". No need to panic.

@eddelbuettel
Copy link
Member

eddelbuettel commented Jan 31, 2023

Actually, even easier is to just remove the line from Makevars and Makevars.win. Recall that we added these when C++11 was still new and barely support (esp on Windows) which got so much better with more recent Rtools (and other C++ compilers). So one possibility now is to not speficify anything. R 4.2.* will get you C++14 already as default; R 4.3.* will give you C++17. And that would be a better general recommendation than hardcoding another language standard.

@aadler
Copy link
Author

aadler commented Jan 31, 2023

Hi, @eddelbuettel.

Thanks. The reason I asked here is, as you surmised, because RcppParallel itself is why those lines are in Makevars (see https://rcppcore.github.io/RcppParallel/#r_packages). I'm using Rtools43 so I'll probably still get the std:iterators issue from #191 and #192, but I know that's being taken care of. Thanks!

@aadler aadler closed this as completed Jan 31, 2023
@eddelbuettel
Copy link
Member

Oh I see -- thanks for the reminder, and my bad.

RcppParallel was one of many packages switching to C++11 as it needed, and could now consider relaxing that. We are getting into new territory here: some libraries will soon set new minimum values as e.g. some Boost libraries now need C++14 or better.

@eddelbuettel
Copy link
Member

And apologies -- I have since learned that CRAN does indeed require / suggest a CXX11 -> CXX17 update for CXX_STD, whether that is wise or not. I just helped another package with a quick ad-hoc PR so if you need a second set of eyes let us know.

@aadler
Copy link
Author

aadler commented Jan 31, 2023

Thank you for the update and no need to apologize at all! I should have been clearer in my initial request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants