Skip to content

Commit f964adb

Browse files
author
ripley
committed
more on C++ support
git-svn-id: https://svn.r-project.org/R/trunk@89081 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 85c982f commit f964adb

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

doc/manual/R-admin.texi

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ C++17/20/23/26 code.
10301030
It may be that there is no suitable flag for C++17/20/23/26 support
10311031
with the default compiler, in which case a different compiler could be
10321032
selected for
1033-
@code{CXX17}/@code{CXX20}/@code{CXX23}/@code{CXX236} with
1033+
@code{CXX17}/@code{CXX20}/@code{CXX23}/@code{CXX26} with
10341034
its corresponding flags.
10351035

10361036
If no suitable compiler/flag is found for the default C++ compiler, one
@@ -1041,32 +1041,26 @@ C++17 tests, so do this at your own risk as some packages may not compile.
10411041
The @option{-std} flag is supported by the GCC, @command{clang++} and
10421042
Intel compilers. Currently accepted values are (plus some synonyms)
10431043
@example
1044-
g++: c++17 gnu++17 (from 8) c++20 gnu++20 (from 10)
1044+
g++: c++17 gnu++17 c++2a gnu++2a(from 8) c++20 gnu++20 (from 10)
10451045
c++23 gnu++23 c++2b gnu++2b (from 11)
10461046
c++2c gnu++2c c++26 gnu++26 (from 14)
10471047
Intel: c++17 gnu++17 c++20 gnu++20 (from 2021.1)
10481048
c++2b gnu++2b (from 2022.2) c++23 gnu++23 (at least from 2024.0)
1049+
c++26 gnu++26 (at least from 2025.1)
10491050
@end example
10501051
@noindent
10511052
(Those for @I{LLVM} @command{clang++} are documented at
1052-
@uref{https://clang.llvm.org/cxx_status.html}, and follow @code{g++}:
1053+
@uref{https://clang.llvm.org/cxx_status.html} and follow @code{g++}:
10531054
@code{-std=c++20} is supported from Clang 10, @code{-std=c++2b} from
1054-
Clang 13 and @code{-std=c++23} and @code{-std=c++2c} from Clang 17.
1055+
Clang 13 and @code{-std=c++23} and @code{-std=c++2c} from Clang 17 and
1056+
currently @code{-std=c++26} (but not in that table).
10551057
Apple Clang supports @code{-std=c++23} and @code{-std=c++26} from 16.0.0.
10561058

1057-
@c c++1y does not pass the configure test in gcc 4.9.3
1058-
@c , with @option{-std=c++1y} (introduced@footnote{See
1059-
@c @uref{https://gcc.gnu.org/projects/cxx-status.html#cxx14} for which
1060-
@c C++14 features it supported.} in version 4.9.x) remaining as a deprecated
1061-
@c synonym.
1062-
10631059
`Standards' for @command{g++} starting with @samp{gnu} enable `GNU
10641060
extensions': what those are is hard to track down.
10651061

10661062
For the use of C++ in @R{} packages,
10671063
@pxref{, , , R-exts, Writing R Extensions}.
1068-
@c Prior to @R{} 3.6.0 the default C++ standard was
1069-
@c that of the compiler used: currently it is C++17.
10701064

10711065
@uref{https://en.cppreference.com/w/cpp/compiler_support.html} indicates
10721066
which versions of common compilers support (parts of) which C++

0 commit comments

Comments
 (0)