From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 212733858C2C; Tue, 2 Jan 2024 16:22:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 212733858C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704212541; bh=fW+Z+hIyHPt9DBJuJmp7rOABhFd5DxulzeiaglHu7cU=; h=From:To:Subject:Date:From; b=XnRTAzbWIXh4b98Fhj+mR8KVsAeOBsyZGEA1KgIyBxxrmeBdenVs4CTbxMgXS8UtH 00xrAtVhpflYCdJ2+CBbXfaYo0FrtFXINnKw3g1JnJyOdPynh47L7zJkP7USpodfuO PeF9GR3jcAUBW8ch6MatMwWN4D3E7vZ3WKYXXnMY= From: "carsten.schmidt-achim at gmx dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/113202] New: std::find does not work with the maximum range of pointers Date: Tue, 02 Jan 2024 16:22:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carsten.schmidt-achim at gmx dot de 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D113202 Bug ID: 113202 Summary: std::find does not work with the maximum range of pointers Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: carsten.schmidt-achim at gmx dot de Target Milestone: --- When using std::find() to operate on a range of pointers that is delimited = by the maximum pointer value possible, AKA std::numeric_limits::max(), std::find() returns unreasonable results; cf. the attached example. When implementing the same functionality using std::ranges::find(), the returned results are reasonable.=