From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 81BCD3853572; Thu, 27 Oct 2022 12:42:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81BCD3853572 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666874527; bh=dm8vm1jQomPzpkR0Fqgh1gYKPCBpMZzdI+x2Tz/dkt0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WFxG1sFfi8HdLlSKswJbGLEGsp9tWSEjJis1P7skSHXroytOfspIs4a5pEJv5Oh1T g4CnTFmsj40P8p+xdE3l3l+xEyyogJXxfXkveHw716D4RW9FVygObWDj19YD6SMcRv 597uivukoKg9VIi/KGzmYczFTr1kcOXYJpqlznAg= From: "ppalka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107429] misdiagnosed "constraint depends on itself" in overloaded functions Date: Thu, 27 Oct 2022 12:42:06 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ppalka at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc resolution 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=3D107429 Patrick Palka changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |ppalka at gcc dot gnu.org Resolution|--- |DUPLICATE --- Comment #1 from Patrick Palka --- Thanks for the bug report. This is a consequence of CWG2369, and the constraint recursion diagnosis is strictly speaking correct correct. I thi= nk other compilers accept it because they don't fully implement https://wg21.link/cwg2369 which moved the constraint satisfaction check dur= ing template argument deduction to _before_ the checking non-dependent conversi= ons. A workaround (that should be valid pre- and post-CWG2369) is to encode the non-dependent conversion in the constrained overload of f as an additional constraint that's checked before the fooable constraint: template U, typename... T> requires (fooable) auto f(U, T... x) see PR99599 and its dups for more info *** This bug has been marked as a duplicate of bug 99599 ***=