From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A981C3858C62; Sat, 22 Oct 2022 13:11:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A981C3858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666444268; bh=9vnit0EHYKEDgf7NphZYMGvbuW8XOSpJInCHAeZOEes=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DelD680RMAyW30qR8fdQLxcdk2YYxW1jwaoYFYAgTSM75B55KqxMN/gd9hkfCpVLd wmY7FIWICL5smmxbDnkdRVsC5YRT/cUUgaEXjG9iioXsdaRjWqYrnzON7T0HB0kQma +EUnJz8bDGcDXlPB2+rdL7Mk/Z37OaCUjGESw4WQ= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106644] [C++23] P2468R2 - The Equality Operator You Are Looking For Date: Sat, 22 Oct 2022 13:11:08 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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=3D106644 --- Comment #3 from Jakub Jelinek --- As for implementation, I'd say in call.cc (add_candidates) we could do something like: if ((flags & (LOOKUP_REWRITTEN | LOOKUP_REVERSE)) && DECL_OVERLOADED_OPERATOR_IS (fn, EQ_EXPR)) { } before the loop on the overloads and depending on whether fn is in class sc= ope or namespace scope perform lookup (again argument dependent or not?) for ovl_op_identifier (false, NE_EXPR) in the same scope. But am not really sure what to do next if this finds something (supposedly = in the loop over the overloads?); I suppose if no template is involved, compare the argument types (what else?), but for templates it is unclear (to me) if= it should try to instantiate them and compare types only afterwards, or what exactly should be checked whether they correspond ([basic.scope.scope]). Because e.g. http://eel.is/c++draft/basic.scope.scope#4.3.1 talks about equivalent trailing requires clauses etc.=