public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r10-10759] Revert "c++: pack init-capture of unresolved overload [PR102629]"
@ 2022-05-25 16:59 Jason Merrill
  0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2022-05-25 16:59 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:bea4429004b02b834c6a15dcc3bfbd953b230585

commit r10-10759-gbea4429004b02b834c6a15dcc3bfbd953b230585
Author: Jason Merrill <jason@redhat.com>
Date:   Wed May 25 12:55:26 2022 -0400

    Revert "c++: pack init-capture of unresolved overload [PR102629]"
    
            PR c++/105722
    
    This reverts commit 93ec7bf22530610ef697fd3a64a28bebd589c790.

Diff:
---
 gcc/cp/pt.c                                    |  8 +-------
 gcc/testsuite/g++.dg/cpp2a/lambda-pack-init7.C | 18 ------------------
 2 files changed, 1 insertion(+), 25 deletions(-)

diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index ab41af4aaca..0a52f0993ab 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -12438,13 +12438,7 @@ gen_elem_of_pack_expansion_instantiation (tree pattern,
     t = tsubst_expr (pattern, args, complain, in_decl,
 		     /*integral_constant_expression_p=*/false);
   else
-    {
-      t = tsubst (pattern, args, complain, in_decl);
-      if (is_auto (t) && !ith_elem_is_expansion)
-	/* When expanding the fake auto... pack expansion from add_capture, we
-	   need to mark that the expansion is no longer a pack.  */
-	TEMPLATE_TYPE_PARAMETER_PACK (t) = false;
-    }
+    t = tsubst (pattern, args, complain, in_decl);
 
   /*  If the Ith argument pack element is a pack expansion, then
       the Ith element resulting from the substituting is going to
diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init7.C b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init7.C
deleted file mode 100644
index f3c3899e97a..00000000000
--- a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init7.C
+++ /dev/null
@@ -1,18 +0,0 @@
-// PR c++/102629
-// { dg-do compile { target c++20 } }
-
-template <class T> T&& forward(T&);
-template <class T> T&& forward(T&&);
-
-struct S {};
-
-template <typename... Args>
-void foo(Args&&... args) {
-  [...args = forward<Args> /*(args)*/] { // { dg-error "" }
-    [](auto...) { } (forward<Args>(args)...);
-  };
-}
-
-void bar( ) {
-  foo(S{});
-}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-25 16:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25 16:59 [gcc r10-10759] Revert "c++: pack init-capture of unresolved overload [PR102629]" Jason Merrill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).