From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 373793850423; Mon, 29 Mar 2021 20:03:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 373793850423 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/93628] ranges::equal_to doesn't work for types convertible to function pointers Date: Mon, 29 Mar 2021 20:03:12 +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: 10.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2021 20:03:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93628 --- Comment #3 from CVS Commits --- The releases/gcc-10 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:913312de92522e9e6696331fc3018e1020845c26 commit r10-9591-g913312de92522e9e6696331fc3018e1020845c26 Author: Jonathan Wakely Date: Wed Mar 10 15:27:06 2021 +0000 libstdc++: Implement LWG 3530 for concept-constrained comparisons The proposed resolution for this library issue simplifies the constraints for compare_three_way, ranges::equal_to, ranges::less etc. so that they do not work with types which are convertible to pointers but which fail to meet the usual syntactic requirements for the comparisons. This affects the example in PR libstdc++/93628 but doesn't fix the problem described in that report. libstdc++-v3/ChangeLog: * include/bits/range_cmp.h (__eq_builtin_ptr_cmp): Remove. (ranges::equal_to, ranges::not_equal_to): Do not constrain with __eq_builtin_ptr_cmp. (ranges::less, ranges::greater, ranges::less_equal) (ranges::greater_equal): Do not constrain with __less_builtin_ptr_cmp. * libsupc++/compare (compare_three_way): Do not constrain with __3way_builtin_ptr_cmp. * testsuite/18_support/comparisons/object/builtin-ptr-three-way= .cc: Moved to... * testsuite/18_support/comparisons/object/lwg3530.cc: ...here. * testsuite/20_util/function_objects/range.cmp/lwg3530.cc: New test. (cherry picked from commit dddd011113b6ceede733d7ae33eca695c06b181b)=