@@ -5878,15 +5878,16 @@ of your compiler diagnostics --- this typically means using flags
5878
5878
@option{-Wstrict-prototypes} for C (on some platforms and compiler
5879
5879
versions) these are part of @option{-Wall} or @option{-pedantic}).
5880
5880
5881
- @strong{C++ standards}: From version 3.6.0 (3.6.2 on Windows), @R{}
5882
- defaulted to C++11 where available@footnote{which it is on all known
5883
- platforms, and is required as from @R{} 4.0.0}; from @R{} 4.1.0 to C++14
5884
- and from @R{} 4.3.0 to C++17 (where available). However, in earlier
5885
- versions the default standard was that of the compiler used, often C++98
5886
- or C++14, and the default is likely to change in future. For maximal
5887
- portability a package should either specify a standard (@pxref{Using C++
5888
- code}) or be tested under all of C++11, C++98, C++14 and C++17.
5889
- (Specifying C++14 or later will limit portability.)
5881
+ @strong{C++ standards}: From version 4.0.0 @R{} reauired and defaulted
5882
+ to C++11; from @R{} 4.1.0 in defaulted to C++14 and from @R{} 4.3.0 to
5883
+ C++17 (where available). For maximal portability a package should
5884
+ either specify a standard (@pxref{Using C++ code}) or be tested under
5885
+ all of C++11, C++14 and C++17.
5886
+
5887
+ Later C++ standards, notably C++17 remove features deprecated in earlier
5888
+ versions. Unfortunately some compilers, notably @command{g++} have
5889
+ retained these features so if possible test under another compiler (such
5890
+ as that used on macOS).
5890
5891
5891
5892
Note that the `TR1' C++ extensions are not part of any of these
5892
5893
standards and the @code{<tr1/@var{name}>} headers are not supplied by some of
@@ -6451,13 +6452,24 @@ Some additional information for C++ is available at
6451
6452
@uref{https://journal.r-project.org/archive/2011-2/RJournal_2011-2_Plummer.pdf}
6452
6453
by @I{Martyn Plummer}.
6453
6454
6455
+ Seversl OSes have or currently do provide multiple C++ runtimes ---
6456
+ Solaris did and the LLVM @command{clang} compiler has a native C++
6457
+ runtime libreary @code{libc++} but is also used with GCC's
6458
+ @code{libstdc++} (by default on Debian/Ubuntu). This makes it unsafe to
6459
+ assume that OS libraries with a C++ interface are compatible with the
6460
+ C++ compiler specified by @R{}. Many of these system libraries also
6461
+ have C interfaces which should be used in preference to their C++
6462
+ interface. Otherwise it is essential that a package checks
6463
+ compatibility in its @command{configure} script, including that C++ code
6464
+ using the library can both be linked @emph{and loaded}.
6465
+
6454
6466
6455
6467
@node Common symbols
6456
6468
@subsubsection Common symbols
6457
6469
6458
6470
Most OSes (including all those commonly used for @R{}) have the concept
6459
6471
of `tentative definitions' where global C variables are defined without
6460
- an initializer. Traditionally the linker resolves all tentative
6472
+ an initializer. Traditionally the linker resolved all tentative
6461
6473
definitions of the same variable in different object files to the same
6462
6474
object, or to a non-tentative definition. However,
6463
6475
@command{gcc}@tie{}10@footnote{see
0 commit comments