From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8891A3857738; Fri, 8 Sep 2023 16:03:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8891A3857738 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694189009; bh=nOm8z1tbAMkGz9NYoYc8GeyyV4qZcm98tWWHWccT27I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GYa+vBgUUigHv9NvdJDS26IxeivNIj7c5qQakRX7G6B4ORBuTqmu2J/C3BsTuXnJH npB+gjTrIlJrEw5Vj9rYUedbyi/qXojEKAMhs057ZY44W3WSitKUPMb7HzINE6z0eB QM0251n2u8hRLloixDx92AeYhk0TlUGRCd/IGs+8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99599] [11/12/13/14 Regression] Concepts requirement falsely reporting cyclic dependency, breaks tag_invoke pattern Date: Fri, 08 Sep 2023 16:03:27 +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: 11.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: SUSPENDED 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=3D99599 --- Comment #18 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:2154bcd6d43cfd821ca70e1583880c4ed955355d commit r14-3809-g2154bcd6d43cfd821ca70e1583880c4ed955355d Author: Patrick Palka Date: Fri Sep 8 12:02:20 2023 -0400 c++: refine CWG 2369 satisfaction vs non-dep convs [PR99599] As described in detail in the PR, the CWG 2369 resolution has the surprising consequence of introducing constraint recursion in seemingly valid and innocent code. This patch attempts to fix this surpising behavior for the majority of problematic cases. Rather than checking satisfaction before _all_ non-dependent conversions, as specified by the CWG resolution, this pat= ch makes us first check "safe" non-dependent conversions, then satisfactio= n, then followed by other non-dependent conversions. A conversion is considered "safe" if computing it is guaranteed to not induce template instantiation, and we conservatively determine this by checking for user-declared constructors (resp. conversion functions) in the parm (resp. arg) class type, roughly. PR c++/99599 gcc/cp/ChangeLog: * pt.cc (check_non_deducible_conversions): Add bool parameter passed down to check_non_deducible_conversion. (fn_type_unification): Call check_non_deducible_conversions an extra time before satisfaction with noninst_only_p=3Dtrue. (conversion_may_instantiate_p): Define. (check_non_deducible_conversion): Add bool parameter controlling whether to compute only conversions that are guaranteed to not induce template instantiation. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-recursive-sat4.C: Make 'Int' non-aggreg= ate in order to preserve intent of the testcase. * g++.dg/cpp2a/concepts-nondep4.C: New test.=