[R-pkg-devel] C++17

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Fri Jul 30 20:06:02 CEST 2021


Section 2.7.3 'C++ Support' of the R Admin manual says, "C++ is not used by R
itself, but support is provided ...".  This is all stored from when R itself
is configure (prior to compiling) and override-able in package configuration
(Section 2.7.3 covers that) but as that in other places _it all depends on
what the user has installed in terms of C++ compilers_.

So packages need to test. R 4.1.0 ensure that _if_ C++ is present it is at
least C++11, R 4.2.0 (aka r-devel now) is currently set to roll this to
C++14.  Which is ... actually rather nice and way better than what had only a
few short years ago. But local system may still need to look after their
local compilers.  I still get bug reports from folks "blessed" with a
particularl Linux distro that seems to persist long enough so that people
aren't even yet at g++ 4.8 or 4.9 (though that environment has workarounds
too). Similarly even when R 4.2.0 comes our there will still be people trying
to build our packages on R 3.6.* or R 3.5.*. Such is life.

So in short, for my money, _assuming_ C++17 is present is still a wee bit far
out. Test for it, enjoy it when it is present and deal with it if not.

Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-package-devel mailing list