From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EA193385841D; Fri, 9 Feb 2024 16:54:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EA193385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707497667; bh=htGZVXk8UqnGG8W8uTUNTXy4CCA3gswVG5VO/eNb9xs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vICQ/ZNL6+XXq/GVJrEAkEDIy3Ry0Hkd7NMSrR+BvMl04vsVFikoHhxGHpv3fjTOG S/DpAzsMERriEgdRAHYI5+7krShT4XwM95uLAjxlUzRyiDPg/W4SaF9b5pRV8MZwKU zLAWNWBy2EBKbFYfzuDV6rN6FBCfB5UnIDHgEOJw= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/113851] boyer_moore_searcher and boyer_moore_horspool_searcher fail to accept ADL-incompatible element types Date: Fri, 09 Feb 2024 16:54:27 +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: 14.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D113851 --- Comment #1 from Jonathan Wakely --- Ugh. The problem is: 1272 | if (__iter =3D=3D _M_bad_char.end()) which does ADL for operator=3D=3D In general there's no way to fix this, we *must* do ADL for iterator equali= ty comparisons (and other operators like operator* and operator++) because they might be named member functions, or they might be built-in operators if the iterator is a pointer. In this case we *must* do ADL for operator=3D=3D because it's a hidden frie= nd so there's no other way to find it. And if you can't test iterators for equali= ty, you can't really do anything useful with them (except for output iterators)= .=