From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3672B3858C39; Fri, 13 Jan 2023 16:15:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3672B3858C39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673626510; bh=jor1rQqJGg1+xLqS3Rfwa2Q3nNuIoQ2dNipsreTGzx4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MBvQsndqdHBP2ar2LcSUYksHWViB7XC/T4GyfPI0aj8vPgbmrIZYYaSA7/IP/qFB5 tEmh07qY5yNag8ht8Iq0MgNvkFIDgMxVqmTVkZjheCEULFnM+dbwZxsAcFJWBSDKv1 OVPGxCieOBmN1tkO8whVBecLfnOmh8NZosNyzPas= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108393] circular concept false-positive Date: Fri, 13 Jan 2023 16:15:10 +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: 12.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: 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=3D108393 --- Comment #2 from Jonathan Wakely --- Specifically, ADL for __t =3D=3D __u finds this function: template friend constexpr bool operator=3D=3D(unreachable_sentinel_t, const _Iter&) noexcept; making it an overload resolution candidate. It's not viable, because __t and __u (which are the same type) cannot be converted to unreachable_sentinel_t. But if the other parameter is checked first, then that means checking wheth= er S satisfies C, because of the constraint C _Iter. [over.match.viable] says: - First, to be a viable function, a candidate function shall have enough parameters to agree in number with the arguments in the list. This condition is met. - Second, for a function to be viable, if it has associated constraints ([temp.constr.decl]), those constraints shall be satisfied The associated constraints are that _Iter satisfies C. This is where the cy= cle happens. - Third, for F to be a viable function, there shall exist for each argument= an implicit conversion sequence that converts that argument to the correspondi= ng parameter of F. This is when the function would be discarded from the candidate set, because S cannot be converted to unreachable_sentinel_t. But it's too late, we already blew up at the second step.=