From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E2CC43858D28; Thu, 28 Mar 2024 11:24:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E2CC43858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711625073; bh=sLlJsqWzX6H+2AbAh/5TmXE7J7n8ycnRzJ8nMKnKPyg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PIu94BIwr4SSMdNqjzABcVftCMYUpcJIXEwFOp6YGLI6oAoyAuDZULac8ybYfQP6V QZRMTQv8yZbBSuSfC8vRCzYG3hNJqKc1XLrTIB+Otk9MRrq8YQIfxC2uxJXFwEpus3 bJ6zrgFahX0yLPv13WsHwRePcc+kFpDm0Mlx9jA4= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/98842] optional's spaceship operations generates wrong code when operator== is not present Date: Thu, 28 Mar 2024 11:24:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.4 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=3D98842 --- Comment #7 from Jonathan Wakely --- (In reply to GCC Commits from comment #3) > Adding that constrain completely breaks std::optional comparisons, > because it causes constraint recursion. To avoid that, an additional > check that U is not a specialization of std::optional is needed. That > appears to be a defect in the standard and should be reported to LWG. For the record, that is https://cplusplus.github.io/LWG/issue3566=