You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
use_cpp11() should not add SystemRequirements: C++11 #1824
That seems like the right move. Looking at the current advice on Writing R Extensions (Using C++ Code), would it be possible to state the standard in src/Makevars[.win/.ucrt]?
They state that setting CXX_STD=CXX14 is preferred (to ensure longer term portability) and is potentially supported as far back as R 3.4.0.
I don't think that is really preferred in the longterm because that locks you in to C++14 even if the code works on C++17 and above. I had CXX_STD=CXX11 in one of my packages and was forced to remove that too. So putting CXX14 in there is just asking for the same problem to happen a few years from now, unless you really require just C++14 and nothing else
True. And I'm not 100% on board with the Writing R Extensions advice, due to the same reasoning. (edit) And it turns out, neither is CRAN - setting CXX_STD gets reported as a NOTE (/edit)
Activity
jennybc commentedon Apr 25, 2023
I haven't gotten an official answer on this, but I'm fairly convinced I've made the right move.
stephematician commentedon May 18, 2023
That seems like the right move. Looking at the current advice on Writing R Extensions (Using C++ Code), would it be possible to state the standard in src/Makevars[.win/.ucrt]?
They state that setting
CXX_STD=CXX14is preferred (to ensure longer term portability) and is potentially supported as far back as R 3.4.0.DavisVaughan commentedon May 18, 2023
I don't think that is really preferred in the longterm because that locks you in to C++14 even if the code works on C++17 and above. I had
CXX_STD=CXX11in one of my packages and was forced to remove that too. So puttingCXX14in there is just asking for the same problem to happen a few years from now, unless you really require just C++14 and nothing elsestephematician commentedon May 18, 2023
True. And I'm not 100% on board with the Writing R Extensions advice, due to the same reasoning. (edit) And it turns out, neither is CRAN - setting CXX_STD gets reported as a NOTE (/edit)
Stop setting C++11 as a SystemRequirement with use_cpp11()