std=c++2b
C++ ObjC++ Alias(std=c++23) Undocumented
-Conform to the ISO 2023 C++ draft standard (experimental and incomplete support).
+Conform to the ISO 2023 C++ standard (published in 2024; experimental and incomplete support).
std=c++23
C++ ObjC++
-Conform to the ISO 2023 C++ draft standard (experimental and incomplete support).
+Conform to the ISO 2023 C++ standard (published in 2024; experimental and incomplete support).
std=c++2c
C++ ObjC++ Alias(std=c++26)
std=gnu++2b
C++ ObjC++ Alias(std=gnu++23) Undocumented
-Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support).
+Conform to the ISO 2023 C++ standard with GNU extensions (published in 2024; experimental and incomplete support).
std=gnu++23
C++ ObjC++
-Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support).
+Conform to the ISO 2023 C++ standard with GNU extensions (published in 2024; experimental and incomplete support).
std=gnu++2c
C++ ObjC++ Alias(std=gnu++26)
future releases.
The name @samp{gnu++2a} is deprecated.
-@item c++2b
-@itemx c++23
-The next revision of the ISO C++ standard, planned for
-2023. Support is highly experimental, and will almost certainly
-change in incompatible ways in future releases.
+@item c++23
+@itemx c++2b
+The 2023 ISO C++ standard plus amendments (published in 2024).
+Support is experimental, and could change in incompatible ways in
+future releases.
+The name @samp{c++2b} is deprecated.
-@item gnu++2b
-@itemx gnu++23
-GNU dialect of @option{-std=c++2b}. Support is highly experimental,
-and will almost certainly change in incompatible ways in future
-releases.
+@item gnu++23
+@itemx gnu++2b
+GNU dialect of @option{-std=c++23}.
+Support is experimental, and could change in incompatible ways in
+future releases.
+The name @samp{gnu++2b} is deprecated.
@item c++2c
@itemx c++26
@section C++ Language
GCC supports the original ISO C++ standard published in 1998,
-and the 2011, 2014, 2017 and mostly 2020 revisions.
+and the 2011, 2014, 2017 and mostly 2020 and 2024 revisions.
The original ISO C++ standard was published as the ISO standard (ISO/IEC
14882:1998) and amended by a Technical Corrigenda published in 2003
@uref{https://gcc.gnu.org/projects/@/cxx-status.html#cxx20}.
To select this standard in GCC, use the option @option{-std=c++20}.
+Yet another revised ISO C++ standard was published in 2024 as ISO/IEC
+14882:2024, and is referred to as C++23; before its publication it was
+sometimes referred to as C++2b. GCC supports most of the changes in the
+new specification. For further details see
+@uref{https://gcc.gnu.org/projects/@/cxx-status.html#cxx23}.
+To select this standard in GCC, use the option @option{-std=c++23}.
+
More information about the C++ standards is available on the ISO C++
committee's web site at @uref{https://www.open-std.org/@/jtc1/@/sc22/@/wg21/}.
@option{-std=gnu++11} (for C++11 with GNU extensions), or
@option{-std=gnu++14} (for C++14 with GNU extensions), or
@option{-std=gnu++17} (for C++17 with GNU extensions), or
-@option{-std=gnu++20} (for C++20 with GNU extensions).
+@option{-std=gnu++20} (for C++20 with GNU extensions), or
+@option{-std=gnu++23} (for C++23 with GNU extensions).
The default, if
no C++ language dialect options are given, is @option{-std=gnu++17}.