[libcxx-commits] [libcxx] [libc++] LWG 3821 uses_allocator_construction_args should have overload for pair-like (PR #66939)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 21 05:22:07 PDT 2023


================
@@ -132,19 +133,48 @@ constexpr bool test() {
   }
 #endif
   {
-    ConvertibleToPair ctp {};
-    auto ret = test_uses_allocator_construction_args<std::pair<int, int>>(a, ctp);
+    ConvertibleToPair ctp{};
+    auto ret              = test_uses_allocator_construction_args<std::pair<int, int>>(a, ctp);
     std::pair<int, int> v = std::get<0>(ret);
     assert(std::get<0>(v) == 1);
     assert(std::get<1>(v) == 2);
   }
   {
-    ConvertibleToPair ctp {};
-    auto ret = test_uses_allocator_construction_args<std::pair<int, int>>(a, std::move(ctp));
+    ConvertibleToPair ctp{};
+    auto ret              = test_uses_allocator_construction_args<std::pair<int, int>>(a, std::move(ctp));
     std::pair<int, int> v = std::get<0>(ret);
     assert(std::get<0>(v) == 1);
     assert(std::get<1>(v) == 2);
   }
+#if TEST_STD_VER >= 23
----------------
ldionne wrote:

We always implement LWG issue resolutions as DRs, so we want to implement this even before C++23.

LWG issues are like "bug fixes", so we don't consider them "features" and we implement them in all possible Standard modes.

https://github.com/llvm/llvm-project/pull/66939


More information about the libcxx-commits mailing list