From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7BE853858412; Wed, 18 Oct 2023 08:44:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7BE853858412 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697618656; bh=TJZ6fWeb73/GsSDn2C7QmiJCu6bzuzGewOeaM49+JP8=; h=From:To:Subject:Date:From; b=exegy0O/GDnRchXH5jAGwrrdrSoU6UnpzrFcz+r7ekra/qhg2YaOMKIF+7RAkKRb3 f26i1SspY8mXhYg+e1DlD7Sttp4q1v0i3S+NNrxj0V63/h0M7jX27gpKgP1ha8A54K Us1X9gRS7/mMQxeEChrDFesFOTLOjbBV9VWY+oEQ= From: "hewillk at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/111861] New: ranges::min/max should not use `auto __result = *__first;` Date: Wed, 18 Oct 2023 08:44:15 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hewillk at gmail dot com 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=3D111861 Bug ID: 111861 Summary: ranges::min/max should not use `auto __result =3D *__first;` Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- The constraints on the function signature do not guarantee that constructible_from>, iter_reference_t<= I>>=20 is true. The same goes for unique_copy's input_range branch. Contrived testcase: https://godbolt.org/z/Kannq6Yo9=