Skip to content

Commit 759fb59

Browse files
authored
[libc++][modules] Mark as implemented. (#90091)
The feature has been implemented in LLVM 18 as an experimental feature. This marks the paper as complete and sets the feature-test macro. Implements - P2465R3 Standard Library Modules std and std.compat Fixes: #89579
1 parent c36961b commit 759fb59

File tree

5 files changed

+40
-1
lines changed

5 files changed

+40
-1
lines changed

libcxx/docs/FeatureTestMacroTable.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ Status
340340
---------------------------------------------------------- -----------------
341341
``__cpp_lib_mdspan`` ``202207L``
342342
---------------------------------------------------------- -----------------
343+
``__cpp_lib_modules`` ``202207L``
344+
---------------------------------------------------------- -----------------
343345
``__cpp_lib_move_only_function`` *unimplemented*
344346
---------------------------------------------------------- -----------------
345347
``__cpp_lib_optional`` ``202110L``

libcxx/docs/Status/Cxx23Papers.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"`P2445R1 <https://wg21.link/P2445R1>`__","LWG","``forward_like``","July 2022","|Complete|","16.0"
7676
"`P2446R2 <https://wg21.link/P2446R2>`__","LWG","``views::as_rvalue``","July 2022","|Complete|","16.0","|ranges|"
7777
"`P2460R2 <https://wg21.link/P2460R2>`__","LWG","Relax requirements on ``wchar_t`` to match existing practices","July 2022","",""
78-
"`P2465R3 <https://wg21.link/P2465R3>`__","LWG","Standard Library Modules ``std`` and ``std.compat``","July 2022","",""
78+
"`P2465R3 <https://wg21.link/P2465R3>`__","LWG","Standard Library Modules ``std`` and ``std.compat``","July 2022","|Complete|","19.0",""
7979
"`P2467R1 <https://wg21.link/P2467R1>`__","LWG","Support exclusive mode for ``fstreams``","July 2022","|Complete|","18.0",""
8080
"`P2474R2 <https://wg21.link/P2474R2>`__","LWG","``views::repeat``","July 2022","|Complete|","17.0","|ranges|"
8181
"`P2494R2 <https://wg21.link/P2494R2>`__","LWG","Relaxing range adaptors to allow for move only types","July 2022","|Complete|","17.0","|ranges|"

libcxx/include/version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ __cpp_lib_void_t 201411L <type_traits>
465465
# define __cpp_lib_ios_noreplace 202207L
466466
# define __cpp_lib_is_scoped_enum 202011L
467467
# define __cpp_lib_mdspan 202207L
468+
# define __cpp_lib_modules 202207L
468469
// # define __cpp_lib_move_only_function 202110L
469470
# undef __cpp_lib_optional
470471
# define __cpp_lib_optional 202110L

libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@
145145
__cpp_lib_math_special_functions 201603L [C++17]
146146
__cpp_lib_mdspan 202207L [C++23]
147147
__cpp_lib_memory_resource 201603L [C++17]
148+
__cpp_lib_modules 202207L [C++23]
148149
__cpp_lib_move_iterator_concept 202207L [C++20]
149150
__cpp_lib_move_only_function 202110L [C++23]
150151
__cpp_lib_node_extract 201606L [C++17]
@@ -740,6 +741,10 @@
740741
# error "__cpp_lib_memory_resource should not be defined before c++17"
741742
# endif
742743

744+
# ifdef __cpp_lib_modules
745+
# error "__cpp_lib_modules should not be defined before c++23"
746+
# endif
747+
743748
# ifdef __cpp_lib_move_iterator_concept
744749
# error "__cpp_lib_move_iterator_concept should not be defined before c++20"
745750
# endif
@@ -1596,6 +1601,10 @@
15961601
# error "__cpp_lib_memory_resource should not be defined before c++17"
15971602
# endif
15981603

1604+
# ifdef __cpp_lib_modules
1605+
# error "__cpp_lib_modules should not be defined before c++23"
1606+
# endif
1607+
15991608
# ifdef __cpp_lib_move_iterator_concept
16001609
# error "__cpp_lib_move_iterator_concept should not be defined before c++20"
16011610
# endif
@@ -2614,6 +2623,10 @@
26142623
# endif
26152624
# endif
26162625

2626+
# ifdef __cpp_lib_modules
2627+
# error "__cpp_lib_modules should not be defined before c++23"
2628+
# endif
2629+
26172630
# ifdef __cpp_lib_move_iterator_concept
26182631
# error "__cpp_lib_move_iterator_concept should not be defined before c++20"
26192632
# endif
@@ -3917,6 +3930,10 @@
39173930
# endif
39183931
# endif
39193932

3933+
# ifdef __cpp_lib_modules
3934+
# error "__cpp_lib_modules should not be defined before c++23"
3935+
# endif
3936+
39203937
# ifndef __cpp_lib_move_iterator_concept
39213938
# error "__cpp_lib_move_iterator_concept should be defined in c++20"
39223939
# endif
@@ -5367,6 +5384,13 @@
53675384
# endif
53685385
# endif
53695386

5387+
# ifndef __cpp_lib_modules
5388+
# error "__cpp_lib_modules should be defined in c++23"
5389+
# endif
5390+
# if __cpp_lib_modules != 202207L
5391+
# error "__cpp_lib_modules should have the value 202207L in c++23"
5392+
# endif
5393+
53705394
# ifndef __cpp_lib_move_iterator_concept
53715395
# error "__cpp_lib_move_iterator_concept should be defined in c++23"
53725396
# endif
@@ -7153,6 +7177,13 @@
71537177
# endif
71547178
# endif
71557179

7180+
# ifndef __cpp_lib_modules
7181+
# error "__cpp_lib_modules should be defined in c++26"
7182+
# endif
7183+
# if __cpp_lib_modules != 202207L
7184+
# error "__cpp_lib_modules should have the value 202207L in c++26"
7185+
# endif
7186+
71567187
# ifndef __cpp_lib_move_iterator_concept
71577188
# error "__cpp_lib_move_iterator_concept should be defined in c++26"
71587189
# endif

libcxx/utils/generate_feature_test_macro_components.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,11 @@ def add_version_header(tc):
858858
"test_suite_guard": "!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_PMR",
859859
"libcxx_guard": "_LIBCPP_AVAILABILITY_HAS_PMR",
860860
},
861+
{
862+
"name": "__cpp_lib_modules",
863+
"values": {"c++23": 202207},
864+
"headers": [],
865+
},
861866
{
862867
"name": "__cpp_lib_move_iterator_concept",
863868
"values": {"c++20": 202207},

0 commit comments

Comments
 (0)