[libcxx-commits] [libcxx] [libc++] P2255R2: Add deleted tuple constructor overloads (PR #205379)

Yihan Wang via libcxx-commits libcxx-commits at lists.llvm.org
Sat Aug 22 04:31:42 PDT 2026


================
@@ -64,40 +64,40 @@ struct ExplicitUnconstrainedCtor {
 int main(int, char**) {
     typedef UnconstrainedCtor A;
     typedef ExplicitUnconstrainedCtor ExplicitA;
-    {
-        static_assert(std::is_copy_constructible<std::tuple<A>>::value, "");
-        static_assert(std::is_move_constructible<std::tuple<A>>::value, "");
-        static_assert(std::is_copy_constructible<std::tuple<ExplicitA>>::value, "");
-        static_assert(std::is_move_constructible<std::tuple<ExplicitA>>::value, "");
-    }
-    {
-        static_assert(std::is_constructible<
-            std::tuple<A>,
-            std::allocator_arg_t, std::allocator<int>,
-            std::tuple<A> const&
-        >::value, "");
-        static_assert(std::is_constructible<
-            std::tuple<A>,
-            std::allocator_arg_t, std::allocator<int>,
-            std::tuple<A> &&
-        >::value, "");
-        static_assert(std::is_constructible<
-            std::tuple<ExplicitA>,
-            std::allocator_arg_t, std::allocator<int>,
-            std::tuple<ExplicitA> const&
-        >::value, "");
-        static_assert(std::is_constructible<
-            std::tuple<ExplicitA>,
-            std::allocator_arg_t, std::allocator<int>,
-            std::tuple<ExplicitA> &&
-        >::value, "");
-    }
-    {
-        std::tuple<A&&> t(std::forward_as_tuple(A{}));
-        ((void)t);
-        std::tuple<ExplicitA&&> t2(std::forward_as_tuple(ExplicitA{}));
-        ((void)t2);
-    }
+
+// Remove this guard when compiler versions older than clang 23 are no longer supported.
+#if defined(TEST_CLANG_VER) && TEST_CLANG_VER >= 2300
+  {
+    static_assert(std::is_copy_constructible<std::tuple<A>>::value, "");
----------------
yronglin wrote:

Done

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


More information about the libcxx-commits mailing list