[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:51 PDT 2026


================
@@ -39,36 +39,63 @@ template <class ...Args>
 void F(typename CannotDeduce<std::tuple<Args...>>::type const&) {}
 
 void f() {
-  // Test that we emit our diagnostic from the library.
+  // Constructing a reference element that would bind to a temporary is rejected. Since C++23
+  // ([tuple.cnstr]) the offending constructors are deleted.
+#if TEST_STD_VER >= 23
+  // expected-error@*:* 8 {{deleted}}
----------------
yronglin wrote:

Done

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


More information about the libcxx-commits mailing list