r-lib / cpp11

cpp11 helps you to interact with R objects using C++ code.
https://cpp11.r-lib.org/
Other
193 stars 46 forks source link

Clarify the necessary "move" w.r.t. `SystemRequirements: C++11` #314

Closed jennybc closed 1 year ago

jennybc commented 1 year ago

Currently cpp11's README and, therefore, home page says:

... add the following to your DESCRIPTION file:

LinkingTo: cpp11
SystemRequirements: C++11

But as we all know too well, CRAN is asking for packages to drop SystemRequirements: C++11 in general.

Should this advice be changed in cpp11?

My immediate motivation for opening this issue is to do my due diligence before I modify usethis::use_cpp11() to stop adding SystemRequirements: C++11 to DESCRIPTION (https://github.com/r-lib/usethis/issues/1824).

stephematician commented 1 year ago

As someone who just submitted their first package ... yeah, that was a weird hurdle. Would make life easier if the advice was updated.

Re some of the advice in that tidyverse blog: I'm not sure I agree that CXX_STD=CXX11 should be removed from Makevars seeing as some older compilers might not default to the standard - so it can't hurt to give them a chance. I'd prefer to leave it in, and CRAN doesn't seem to mind.

jennybc commented 1 year ago

Since I opened this issue, I made the executive decision for usethis::use_cpp11() to stop putting C++11 in SystemRequirements. That is currently only the dev version of usethis, but there will be a release soon-ish.

https://github.com/r-lib/usethis/commit/4a83ded76fcd813c6846fdca0ce2d9c16e05524a