[libcxx-commits] [libcxx] 0534358 - [libc++] [P0646] Add feature-test macro for __cpp_lib_list_remove_return_type.

Marek Kurdej via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 12 03:06:57 PDT 2020


Author: Marek Kurdej
Date: 2020-03-12T11:06:49+01:00
New Revision: 05343588e3bf126319e166e55519531d29d08ba6

URL: https://github.com/llvm/llvm-project/commit/05343588e3bf126319e166e55519531d29d08ba6
DIFF: https://github.com/llvm/llvm-project/commit/05343588e3bf126319e166e55519531d29d08ba6.diff

LOG: [libc++] [P0646] Add feature-test macro for __cpp_lib_list_remove_return_type.

Summary: The return type modification has already been implemented in rL364840 and rL365290.

Reviewers: ldionne, mclow.lists, EricWF, #libc!

Reviewed By: ldionne

Subscribers: christof, dexonsmith, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D70275

Added: 
    

Modified: 
    libcxx/docs/FeatureTestMacroTable.rst
    libcxx/include/version
    libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
    libcxx/utils/generate_feature_test_macro_components.py
    libcxx/www/cxx2a_status.html

Removed: 
    


################################################################################
diff  --git a/libcxx/docs/FeatureTestMacroTable.rst b/libcxx/docs/FeatureTestMacroTable.rst
index a02e727f19ad..739e5a4c549f 100644
--- a/libcxx/docs/FeatureTestMacroTable.rst
+++ b/libcxx/docs/FeatureTestMacroTable.rst
@@ -194,7 +194,7 @@ Status
     ------------------------------------------------- -----------------
     ``__cpp_lib_is_constant_evaluated``               ``201811L``      
     ------------------------------------------------- -----------------
-    ``__cpp_lib_list_remove_return_type``             *unimplemented*  
+    ``__cpp_lib_list_remove_return_type``             ``201806L``      
     ------------------------------------------------- -----------------
     ``__cpp_lib_ranges``                              *unimplemented*  
     ------------------------------------------------- -----------------

diff  --git a/libcxx/include/version b/libcxx/include/version
index 2d9a2b325f8a..ab62a853ceb5 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -232,7 +232,7 @@ __cpp_lib_void_t                                        201411L <type_traits>
 # if !defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED)
 #   define __cpp_lib_is_constant_evaluated              201811L
 # endif
-// # define __cpp_lib_list_remove_return_type              201806L
+# define __cpp_lib_list_remove_return_type              201806L
 // # define __cpp_lib_ranges                               201811L
 # define __cpp_lib_to_array                                201907L
 // # define __cpp_lib_three_way_comparison                 201711L

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp
index 7ecad6d3e340..4004e6b70a2a 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp
@@ -122,17 +122,11 @@
 #   error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++2a"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
-#   ifndef __cpp_lib_list_remove_return_type
-#     error "__cpp_lib_list_remove_return_type should be defined in c++2a"
-#   endif
-#   if __cpp_lib_list_remove_return_type != 201806L
-#     error "__cpp_lib_list_remove_return_type should have the value 201806L in c++2a"
-#   endif
-# else // _LIBCPP_VERSION
-#   ifdef __cpp_lib_list_remove_return_type
-#     error "__cpp_lib_list_remove_return_type should not be defined because it is unimplemented in libc++!"
-#   endif
+# ifndef __cpp_lib_list_remove_return_type
+#   error "__cpp_lib_list_remove_return_type should be defined in c++2a"
+# endif
+# if __cpp_lib_list_remove_return_type != 201806L
+#   error "__cpp_lib_list_remove_return_type should have the value 201806L in c++2a"
 # endif
 
 # ifndef __cpp_lib_nonmember_container_access

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp
index b736d1f9a216..01570b69a5bb 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp
@@ -122,17 +122,11 @@
 #   error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++2a"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
-#   ifndef __cpp_lib_list_remove_return_type
-#     error "__cpp_lib_list_remove_return_type should be defined in c++2a"
-#   endif
-#   if __cpp_lib_list_remove_return_type != 201806L
-#     error "__cpp_lib_list_remove_return_type should have the value 201806L in c++2a"
-#   endif
-# else // _LIBCPP_VERSION
-#   ifdef __cpp_lib_list_remove_return_type
-#     error "__cpp_lib_list_remove_return_type should not be defined because it is unimplemented in libc++!"
-#   endif
+# ifndef __cpp_lib_list_remove_return_type
+#   error "__cpp_lib_list_remove_return_type should be defined in c++2a"
+# endif
+# if __cpp_lib_list_remove_return_type != 201806L
+#   error "__cpp_lib_list_remove_return_type should have the value 201806L in c++2a"
 # endif
 
 # ifndef __cpp_lib_nonmember_container_access

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
index 979d7dbb3182..c55c577aa003 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
@@ -1899,17 +1899,11 @@
 #   error "__cpp_lib_launder should have the value 201606L in c++2a"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
-#   ifndef __cpp_lib_list_remove_return_type
-#     error "__cpp_lib_list_remove_return_type should be defined in c++2a"
-#   endif
-#   if __cpp_lib_list_remove_return_type != 201806L
-#     error "__cpp_lib_list_remove_return_type should have the value 201806L in c++2a"
-#   endif
-# else // _LIBCPP_VERSION
-#   ifdef __cpp_lib_list_remove_return_type
-#     error "__cpp_lib_list_remove_return_type should not be defined because it is unimplemented in libc++!"
-#   endif
+# ifndef __cpp_lib_list_remove_return_type
+#   error "__cpp_lib_list_remove_return_type should be defined in c++2a"
+# endif
+# if __cpp_lib_list_remove_return_type != 201806L
+#   error "__cpp_lib_list_remove_return_type should have the value 201806L in c++2a"
 # endif
 
 # ifndef __cpp_lib_logical_traits

diff  --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index faec06525814..8caee5c13ba9 100755
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -542,7 +542,6 @@ def add_version_header(tc):
      "c++2a": int(201806),
    },
    "headers": ["forward_list", "list"],
-   "unimplemented": True,
    },
   {"name": "__cpp_lib_generic_unordered_lookup",
    "values": {

diff  --git a/libcxx/www/cxx2a_status.html b/libcxx/www/cxx2a_status.html
index add53d46670b..c8a74b56dafd 100644
--- a/libcxx/www/cxx2a_status.html
+++ b/libcxx/www/cxx2a_status.html
@@ -90,7 +90,7 @@ <h3>Paper Status</h3>
 	<tr><td><a href="https://wg21.link/P0542R5">P0542R5</a></td><td>CWG</td><td>Support for contract based programming in C++</td><td>Rapperswil</td><td></td><td></td></tr>
 	<tr><td><a href="https://wg21.link/P0556R3">P0556R3</a></td><td>LWG</td><td>Integral power-of-2 operations</td><td>Rapperswil</td><td>Complete</td><td>9.0</td></tr>
 	<tr><td><a href="https://wg21.link/P0619R4">P0619R4</a></td><td>LWG</td><td>Reviewing Deprecated Facilities of C++17 for C++20</td><td>Rapperswil</td><td></td><td></td></tr>
-	<tr><td><a href="https://wg21.link/P0646R1">P0646R1</a></td><td>LWG</td><td>Improving the Return Value of Erase-Like Algorithms</td><td>Rapperswil</td><td></td><td></td></tr>
+	<tr><td><a href="https://wg21.link/P0646R1">P0646R1</a></td><td>LWG</td><td>Improving the Return Value of Erase-Like Algorithms</td><td>Rapperswil</td><td>Complete</td><td>10.0</td></tr>
 	<tr><td><a href="https://wg21.link/P0722R3">P0722R3</a></td><td>CWG</td><td>Efficient sized delete for variable sized classes</td><td>Rapperswil</td><td>Complete</td><td>9.0</td></tr>
 	<tr><td><a href="https://wg21.link/P0758R1">P0758R1</a></td><td>LWG</td><td>Implicit conversion traits and utility functions</td><td>Rapperswil</td><td>Complete</td><td></td></tr>
 	<tr><td><a href="https://wg21.link/P0759R1">P0759R1</a></td><td>LWG</td><td>fpos Requirements</td><td>Rapperswil</td><td></td><td></td></tr>


        


More information about the libcxx-commits mailing list