[libcxx-commits] [libcxx] 759fb59 - [libc++][modules] Mark as implemented. (#90091)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 12 10:01:32 PDT 2024
Author: Mark de Wever
Date: 2024-06-12T19:01:27+02:00
New Revision: 759fb590da445e1bf572ac295d0d76b950cf3b8e
URL: https://github.com/llvm/llvm-project/commit/759fb590da445e1bf572ac295d0d76b950cf3b8e
DIFF: https://github.com/llvm/llvm-project/commit/759fb590da445e1bf572ac295d0d76b950cf3b8e.diff
LOG: [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: https://github.com/llvm/llvm-project/issues/89579
Added:
Modified:
libcxx/docs/FeatureTestMacroTable.rst
libcxx/docs/Status/Cxx23Papers.csv
libcxx/include/version
libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
libcxx/utils/generate_feature_test_macro_components.py
Removed:
################################################################################
diff --git a/libcxx/docs/FeatureTestMacroTable.rst b/libcxx/docs/FeatureTestMacroTable.rst
index 1e706a542eaf2..72f624fa746b4 100644
--- a/libcxx/docs/FeatureTestMacroTable.rst
+++ b/libcxx/docs/FeatureTestMacroTable.rst
@@ -340,6 +340,8 @@ Status
---------------------------------------------------------- -----------------
``__cpp_lib_mdspan`` ``202207L``
---------------------------------------------------------- -----------------
+ ``__cpp_lib_modules`` ``202207L``
+ ---------------------------------------------------------- -----------------
``__cpp_lib_move_only_function`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_optional`` ``202110L``
diff --git a/libcxx/docs/Status/Cxx23Papers.csv b/libcxx/docs/Status/Cxx23Papers.csv
index 01387a404f5d6..36d7f78285aa9 100644
--- a/libcxx/docs/Status/Cxx23Papers.csv
+++ b/libcxx/docs/Status/Cxx23Papers.csv
@@ -75,7 +75,7 @@
"`P2445R1 <https://wg21.link/P2445R1>`__","LWG","``forward_like``","July 2022","|Complete|","16.0"
"`P2446R2 <https://wg21.link/P2446R2>`__","LWG","``views::as_rvalue``","July 2022","|Complete|","16.0","|ranges|"
"`P2460R2 <https://wg21.link/P2460R2>`__","LWG","Relax requirements on ``wchar_t`` to match existing practices","July 2022","",""
-"`P2465R3 <https://wg21.link/P2465R3>`__","LWG","Standard Library Modules ``std`` and ``std.compat``","July 2022","",""
+"`P2465R3 <https://wg21.link/P2465R3>`__","LWG","Standard Library Modules ``std`` and ``std.compat``","July 2022","|Complete|","19.0",""
"`P2467R1 <https://wg21.link/P2467R1>`__","LWG","Support exclusive mode for ``fstreams``","July 2022","|Complete|","18.0",""
"`P2474R2 <https://wg21.link/P2474R2>`__","LWG","``views::repeat``","July 2022","|Complete|","17.0","|ranges|"
"`P2494R2 <https://wg21.link/P2494R2>`__","LWG","Relaxing range adaptors to allow for move only types","July 2022","|Complete|","17.0","|ranges|"
diff --git a/libcxx/include/version b/libcxx/include/version
index 68e0e6c3ab84e..cac6eaa3b6e88 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -465,6 +465,7 @@ __cpp_lib_void_t 201411L <type_traits>
# define __cpp_lib_ios_noreplace 202207L
# define __cpp_lib_is_scoped_enum 202011L
# define __cpp_lib_mdspan 202207L
+# define __cpp_lib_modules 202207L
// # define __cpp_lib_move_only_function 202110L
# undef __cpp_lib_optional
# define __cpp_lib_optional 202110L
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
index b882fe4f047b3..32ed30e21cbbe 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
@@ -145,6 +145,7 @@
__cpp_lib_math_special_functions 201603L [C++17]
__cpp_lib_mdspan 202207L [C++23]
__cpp_lib_memory_resource 201603L [C++17]
+ __cpp_lib_modules 202207L [C++23]
__cpp_lib_move_iterator_concept 202207L [C++20]
__cpp_lib_move_only_function 202110L [C++23]
__cpp_lib_node_extract 201606L [C++17]
@@ -740,6 +741,10 @@
# error "__cpp_lib_memory_resource should not be defined before c++17"
# endif
+# ifdef __cpp_lib_modules
+# error "__cpp_lib_modules should not be defined before c++23"
+# endif
+
# ifdef __cpp_lib_move_iterator_concept
# error "__cpp_lib_move_iterator_concept should not be defined before c++20"
# endif
@@ -1596,6 +1601,10 @@
# error "__cpp_lib_memory_resource should not be defined before c++17"
# endif
+# ifdef __cpp_lib_modules
+# error "__cpp_lib_modules should not be defined before c++23"
+# endif
+
# ifdef __cpp_lib_move_iterator_concept
# error "__cpp_lib_move_iterator_concept should not be defined before c++20"
# endif
@@ -2614,6 +2623,10 @@
# endif
# endif
+# ifdef __cpp_lib_modules
+# error "__cpp_lib_modules should not be defined before c++23"
+# endif
+
# ifdef __cpp_lib_move_iterator_concept
# error "__cpp_lib_move_iterator_concept should not be defined before c++20"
# endif
@@ -3917,6 +3930,10 @@
# endif
# endif
+# ifdef __cpp_lib_modules
+# error "__cpp_lib_modules should not be defined before c++23"
+# endif
+
# ifndef __cpp_lib_move_iterator_concept
# error "__cpp_lib_move_iterator_concept should be defined in c++20"
# endif
@@ -5367,6 +5384,13 @@
# endif
# endif
+# ifndef __cpp_lib_modules
+# error "__cpp_lib_modules should be defined in c++23"
+# endif
+# if __cpp_lib_modules != 202207L
+# error "__cpp_lib_modules should have the value 202207L in c++23"
+# endif
+
# ifndef __cpp_lib_move_iterator_concept
# error "__cpp_lib_move_iterator_concept should be defined in c++23"
# endif
@@ -7153,6 +7177,13 @@
# endif
# endif
+# ifndef __cpp_lib_modules
+# error "__cpp_lib_modules should be defined in c++26"
+# endif
+# if __cpp_lib_modules != 202207L
+# error "__cpp_lib_modules should have the value 202207L in c++26"
+# endif
+
# ifndef __cpp_lib_move_iterator_concept
# error "__cpp_lib_move_iterator_concept should be defined in c++26"
# endif
diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index 54206fb0c9bbf..fe5bab05195a3 100755
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -858,6 +858,11 @@ def add_version_header(tc):
"test_suite_guard": "!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_PMR",
"libcxx_guard": "_LIBCPP_AVAILABILITY_HAS_PMR",
},
+ {
+ "name": "__cpp_lib_modules",
+ "values": {"c++23": 202207},
+ "headers": [],
+ },
{
"name": "__cpp_lib_move_iterator_concept",
"values": {"c++20": 202207},
More information about the libcxx-commits
mailing list