From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 93FBD3857344; Mon, 18 Sep 2023 18:41:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93FBD3857344 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1695062479; bh=S3ZkFVd4Cv1Sr9+05vO/j+jDhDg4z1H3zolo5YoKr6Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bl8SR1/GpymGdK8qjDnMHMsVnZGHk5H0NQap8LUhG+Yjg7K7JRbj7ZL4LhvL9OMr/ 9j3EMCmq2ctCs8107QBPk2e1AvsmIHqSWvUg/iKUNupog2wRxQa69y+izOVXiUDG88 NyNzyotvf8LHxi8NLEKvwOsmLYwUcCpxljPEKxsc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBjKysvODQwNzVdIFsxMS8xMi8xMy8xNCBSZWdyZXNzaW9u?= =?UTF-8?B?XSBUZW1wbGF0ZSBwYXJhbWV0ZXIgbm90IHJlc29sdmVkOiBpbnZhbGlkIGFw?= =?UTF-8?B?cGxpY2F0aW9uIG9mIOKAmHNpemVvZuKAmSB0byBpbmNvbXBsZXRlIHR5cGUg?= =?UTF-8?B?4oCYYm9vc3Q6OnNlcmlhbGl6YXRpb246OlXigJk=?= Date: Mon, 18 Sep 2023 18:41:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 7.3.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D84075 --- Comment #14 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:155178ccb5f5bc89dcc8261ae1b64bc2fbfdbd45 commit r14-4109-g155178ccb5f5bc89dcc8261ae1b64bc2fbfdbd45 Author: Patrick Palka Date: Mon Sep 18 14:41:05 2023 -0400 c++: always check arity before deduction This simple patch extends the r12-3271-gf1e73199569287 optimization to happen for deduction without explicit template arguments as well. The motivation for this is to accept testcases such as conv20.C and ttp40.C below, which don't use explicit template arguments but for which unnecessary template instantiation during deduction could be avoided if we uniformly pruned overloads according to arity early. This incidentally causes us to accept one reduced testcase from PR c++/84075, but the underlying issue there remains at large. As a nice side effect, this change causes the "candidate expects N argument(s)" note during overload resolution failure to point to the template candidate instead of the call site, which seems like an improvement along the lines of r14-309-g14e881eb030509. gcc/cp/ChangeLog: * call.cc (add_template_candidate_real): Check arity even when there are no explicit template arguments. Combine the two adjacent '!obj' tests into one. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/vt-57397-1.C: Expect "candidate expects ... N argument(s)" at the declaration site instead of the call site. * g++.dg/cpp0x/vt-57397-2.C: Likewise. * g++.dg/overload/template5.C: Likewise. * g++.dg/template/local6.C: Likewise. * g++.dg/template/conv20.C: New test. * g++.dg/template/ttp40.C: New test.=