Skip to content

Commit 7140050

Browse files
committed
[libc++] Updates C++2b to C++23.
During the ISO C++ Committee meeting plenary session the C++23 Standard has been voted as technical complete. This updates the reference to c++2b to c++23 and updates the __cplusplus macro. Note since we use clang-tidy 16 a small work-around is needed. Clang knows -std=c++23 but clang-tidy not so for now force the lit compiler flag to use -std=c++2b instead of -std=c++23. Reviewed By: #libc, philnik, jloser, ldionne Differential Revision: https://reviews.llvm.org/D150795
1 parent 90418dc commit 7140050

File tree

95 files changed

+1335
-1327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+1335
-1327
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
set(LIBCXX_TEST_PARAMS "std=c++2b" CACHE STRING "")
1+
set(LIBCXX_TEST_PARAMS "std=c++23" CACHE STRING "")
22
set(LIBCXXABI_TEST_PARAMS "${LIBCXX_TEST_PARAMS}" CACHE STRING "")

libcxx/docs/FeatureTestMacroTable.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ Status
298298
------------------------------------------------- -----------------
299299
``__cpp_lib_unwrap_ref`` ``201811L``
300300
------------------------------------------------- -----------------
301-
**C++ 2b**
301+
**C++ 23**
302302
-------------------------------------------------------------------
303303
``__cpp_lib_adaptor_iterator_pair_constructor`` ``202106L``
304304
------------------------------------------------- -----------------

libcxx/docs/ReleaseNotes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Deprecations and Removals
7070
includes are removed based on the language version used. Incidental transitive
7171
inclusions of the following headers have been removed:
7272

73-
- C++2b: ``atomic``, ``bit``, ``cstdint``, ``cstdlib``, ``cstring``, ``initializer_list``, ``limits``, ``new``,
73+
- C++23: ``atomic``, ``bit``, ``cstdint``, ``cstdlib``, ``cstring``, ``initializer_list``, ``limits``, ``new``,
7474
``stdexcept``, ``system_error``, ``type_traits``, ``typeinfo``
7575

7676
- ``<algorithm>`` no longer includes ``<chrono>`` in any C++ version (it was previously included in C++17 and earlier).

libcxx/docs/Status/Cxx2b.rst renamed to libcxx/docs/Status/Cxx23.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.. _cxx2b-status:
1+
.. _cxx23-status:
22

33
================================
4-
libc++ C++2b Status
4+
libc++ C++23 Status
55
================================
66

77
.. include:: ../Helpers/Styles.rst
@@ -14,6 +14,7 @@ Overview
1414
================================
1515

1616
In November 2020, the C++ standard committee adopted the first changes to the next version of the C++ standard, known here as "C++2b" (probably to be C++23).
17+
In February 2023, the C++ standard committee approved this draft, and sent it to ISO for approval as C++23.
1718

1819
This page shows the status of libc++; the status of clang's support of the language features is `here <https://clang.llvm.org/cxx_status.html#cxx23>`__.
1920

@@ -27,13 +28,13 @@ The groups that have contributed papers:
2728

2829
.. note:: "Nothing to do" means that no library changes were needed to implement this change.
2930

30-
.. _paper-status-cxx2b:
31+
.. _paper-status-cxx23:
3132

3233
Paper Status
3334
====================================
3435

3536
.. csv-table::
36-
:file: Cxx2bPapers.csv
37+
:file: Cxx23Papers.csv
3738
:header-rows: 1
3839
:widths: auto
3940

@@ -48,13 +49,13 @@ Paper Status
4849
The formatter for ``stacktrace`` is not implemented, since ``stacktrace`` is
4950
not implemented yet.
5051
51-
.. _issues-status-cxx2b:
52+
.. _issues-status-cxx23:
5253

5354
Library Working Group Issues Status
5455
====================================
5556

5657
.. csv-table::
57-
:file: Cxx2bIssues.csv
58+
:file: Cxx23Issues.csv
5859
:header-rows: 1
5960
:widths: auto
6061

libcxx/docs/Status/Zip.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ libc++ Zip Status (P2321R2)
1212
Overview
1313
========
1414

15-
This document contains the status of the C++2b zip implementation in libc++.
15+
This document contains the status of the C++23 zip implementation in libc++.
1616
It is used to track both the status of the sub-projects of the effort and who
1717
is assigned to these sub-projects. This avoids duplicating effort.
1818

libcxx/docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Getting Started with libc++
4242
Status/Cxx14
4343
Status/Cxx17
4444
Status/Cxx20
45-
Status/Cxx2b
45+
Status/Cxx23
4646
Status/Format
4747
Status/Parallelism
4848
Status/Ranges
@@ -145,7 +145,7 @@ C++ Dialect Support
145145
* :ref:`C++14 - Complete <cxx14-status>`
146146
* :ref:`C++17 - In Progress <cxx17-status>`
147147
* :ref:`C++20 - In Progress <cxx20-status>`
148-
* :ref:`C++2b - In Progress <cxx2b-status>`
148+
* :ref:`C++23 - In Progress <cxx23-status>`
149149
* :ref:`C++ Feature Test Macro Status <feature-status>`
150150

151151

libcxx/include/__config

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,11 @@
6161
# define _LIBCPP_STD_VER 17
6262
# elif __cplusplus <= 202002L
6363
# define _LIBCPP_STD_VER 20
64+
# elif __cplusplus <= 202302L
65+
# define _LIBCPP_STD_VER 23
6466
# else
6567
// Expected release year of the next C++ standard
66-
# define _LIBCPP_STD_VER 23
68+
# define _LIBCPP_STD_VER 26
6769
# endif
6870
# endif // _LIBCPP_STD_VER
6971
// NOLINTEND(libcpp-cpp-version-check)

libcxx/include/ranges

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,13 @@ namespace std::ranges {
294294
// [range.zip], zip view
295295
template<input_range... Views>
296296
requires (view<Views> && ...) && (sizeof...(Views) > 0)
297-
class zip_view; // C++2b
297+
class zip_view; // C++23
298298
299299
template<class... Views>
300-
inline constexpr bool enable_borrowed_range<zip_view<Views...>> = // C++2b
300+
inline constexpr bool enable_borrowed_range<zip_view<Views...>> = // C++23
301301
(enable_borrowed_range<Views> && ...);
302302
303-
namespace views { inline constexpr unspecified zip = unspecified; } // C++2b
303+
namespace views { inline constexpr unspecified zip = unspecified; } // C++23
304304
305305
// [range.as.rvalue]
306306
template <view V>

0 commit comments

Comments
 (0)