[libcxx-commits] [libcxx] 5d78fef - [libc++] Fix LWG3437 "__cpp_lib_polymorphic_allocator is in the wrong header"
Arthur O'Dwyer via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jan 23 07:30:59 PST 2022
Author: Arthur O'Dwyer
Date: 2022-01-23T10:30:09-05:00
New Revision: 5d78fef6db15f7ba6642431fa3d07ddeda98d4f5
URL: https://github.com/llvm/llvm-project/commit/5d78fef6db15f7ba6642431fa3d07ddeda98d4f5
DIFF: https://github.com/llvm/llvm-project/commit/5d78fef6db15f7ba6642431fa3d07ddeda98d4f5.diff
LOG: [libc++] Fix LWG3437 "__cpp_lib_polymorphic_allocator is in the wrong header"
https://cplusplus.github.io/LWG/issue3437
Differential Revision: https://reviews.llvm.org/D117963
Added:
Modified:
libcxx/docs/Status/Cxx2bIssues.csv
libcxx/include/version
libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp
libcxx/utils/generate_feature_test_macro_components.py
Removed:
################################################################################
diff --git a/libcxx/docs/Status/Cxx2bIssues.csv b/libcxx/docs/Status/Cxx2bIssues.csv
index 27b109eeb5dd9..27bc1e5832967 100644
--- a/libcxx/docs/Status/Cxx2bIssues.csv
+++ b/libcxx/docs/Status/Cxx2bIssues.csv
@@ -31,7 +31,7 @@
"`3427 <https://wg21.link/LWG3427>`__","``operator<=>(const shared_ptr<T>&, nullptr_t)`` definition ill-formed","November 2020","","","|spaceship|"
"`3428 <https://wg21.link/LWG3428>`__","``single_view``'s in place constructor should be explicit","November 2020","","","|ranges|"
"`3434 <https://wg21.link/LWG3434>`__","``ios_base`` never reclaims memory for iarray and parray","November 2020","",""
-"`3437 <https://wg21.link/LWG3437>`__","``__cpp_lib_polymorphic_allocator`` is in the wrong header","November 2020","",""
+"`3437 <https://wg21.link/LWG3437>`__","``__cpp_lib_polymorphic_allocator`` is in the wrong header","November 2020","|Complete|","14.0"
"`3446 <https://wg21.link/LWG3446>`__","``indirectly_readable_traits`` ambiguity for types with both ``value_type`` and ``element_type``","November 2020","","","|ranges|"
"`3448 <https://wg21.link/LWG3448>`__","``transform_view``'s ``sentinel<false>`` not comparable with ``iterator<true>``","November 2020","","","|ranges|"
"`3449 <https://wg21.link/LWG3449>`__","``take_view`` and ``take_while_view``'s ``sentinel<false>`` not comparable with their ``const iterator``","November 2020","","","|ranges|"
diff --git a/libcxx/include/version b/libcxx/include/version
index 39f1b8eb19ef1..0c23656128536 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -128,7 +128,7 @@ __cpp_lib_null_iterators 201304L <iterator>
__cpp_lib_optional 201606L <optional>
__cpp_lib_out_ptr 202106L <memory>
__cpp_lib_parallel_algorithm 201603L <algorithm> <numeric>
-__cpp_lib_polymorphic_allocator 201902L <memory>
+__cpp_lib_polymorphic_allocator 201902L <memory_resource>
__cpp_lib_quoted_string_io 201304L <iomanip>
__cpp_lib_ranges 201811L <algorithm> <functional> <iterator>
<memory> <ranges>
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp
index 415eaa385767e..20fe2514b4eff 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp
@@ -26,7 +26,6 @@
__cpp_lib_enable_shared_from_this 201603L [C++17]
__cpp_lib_make_unique 201304L [C++14]
__cpp_lib_out_ptr 202106L [C++2b]
- __cpp_lib_polymorphic_allocator 201902L [C++20]
__cpp_lib_ranges 201811L [C++20]
__cpp_lib_raw_memory_algorithms 201606L [C++17]
__cpp_lib_shared_ptr_arrays 201611L [C++17]
@@ -82,10 +81,6 @@
# error "__cpp_lib_out_ptr should not be defined before c++2b"
# endif
-# ifdef __cpp_lib_polymorphic_allocator
-# error "__cpp_lib_polymorphic_allocator should not be defined before c++20"
-# endif
-
# ifdef __cpp_lib_ranges
# error "__cpp_lib_ranges should not be defined before c++20"
# endif
@@ -159,10 +154,6 @@
# error "__cpp_lib_out_ptr should not be defined before c++2b"
# endif
-# ifdef __cpp_lib_polymorphic_allocator
-# error "__cpp_lib_polymorphic_allocator should not be defined before c++20"
-# endif
-
# ifdef __cpp_lib_ranges
# error "__cpp_lib_ranges should not be defined before c++20"
# endif
@@ -248,10 +239,6 @@
# error "__cpp_lib_out_ptr should not be defined before c++2b"
# endif
-# ifdef __cpp_lib_polymorphic_allocator
-# error "__cpp_lib_polymorphic_allocator should not be defined before c++20"
-# endif
-
# ifdef __cpp_lib_ranges
# error "__cpp_lib_ranges should not be defined before c++20"
# endif
@@ -364,19 +351,6 @@
# error "__cpp_lib_out_ptr should not be defined before c++2b"
# endif
-# if !defined(_LIBCPP_VERSION)
-# ifndef __cpp_lib_polymorphic_allocator
-# error "__cpp_lib_polymorphic_allocator should be defined in c++20"
-# endif
-# if __cpp_lib_polymorphic_allocator != 201902L
-# error "__cpp_lib_polymorphic_allocator should have the value 201902L in c++20"
-# endif
-# else // _LIBCPP_VERSION
-# ifdef __cpp_lib_polymorphic_allocator
-# error "__cpp_lib_polymorphic_allocator should not be defined because it is unimplemented in libc++!"
-# endif
-# endif
-
# if !defined(_LIBCPP_VERSION)
# ifndef __cpp_lib_ranges
# error "__cpp_lib_ranges should be defined in c++20"
@@ -528,19 +502,6 @@
# endif
# endif
-# if !defined(_LIBCPP_VERSION)
-# ifndef __cpp_lib_polymorphic_allocator
-# error "__cpp_lib_polymorphic_allocator should be defined in c++2b"
-# endif
-# if __cpp_lib_polymorphic_allocator != 201902L
-# error "__cpp_lib_polymorphic_allocator should have the value 201902L in c++2b"
-# endif
-# else // _LIBCPP_VERSION
-# ifdef __cpp_lib_polymorphic_allocator
-# error "__cpp_lib_polymorphic_allocator should not be defined because it is unimplemented in libc++!"
-# endif
-# endif
-
# if !defined(_LIBCPP_VERSION)
# ifndef __cpp_lib_ranges
# error "__cpp_lib_ranges should be defined in c++2b"
diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index 7047f3f4b0cc1..7b2fc0b621940 100755
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -508,7 +508,7 @@ def add_version_header(tc):
}, {
"name": "__cpp_lib_polymorphic_allocator",
"values": { "c++20": 201902 },
- "headers": ["memory"],
+ "headers": ["memory_resource"],
"unimplemented": True,
}, {
"name": "__cpp_lib_quoted_string_io",
More information about the libcxx-commits
mailing list