CRAN asking for C++17
aadler opened this issue · 6 comments
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
- That's an ongoing conversation in several places, see eg my tweet here
- 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.
- The note is in your package, and not in RcppParallel. So why do you ask here? Did you maybe mean to email
rcpp-devel
? - 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.
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.
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!
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.
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.
Thank you for the update and no need to apologize at all! I should have been clearer in my initial request.