This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Remove __gnu_pbds::detail::binary_heap::is_heap (PR libstdc++/62045) [resend]
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Xi Ruoyao <ryxi at stu dot xidian dot edu dot cn>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 10 Mar 2017 11:54:58 +0000
- Subject: Re: [PATCH] Remove __gnu_pbds::detail::binary_heap::is_heap (PR libstdc++/62045) [resend]
- Authentication-results: sourceware.org; auth=none
- References: <1489145808.1763.21.camel@stu.xidian.edu.cn>
On 10/03/17 19:36 +0800, Xi Ruoyao wrote:
Hi,
This was resent to be in both libstdc++ and gcc-patches list.
Thanks.
The ill-formed checking in binary_heap::push_heap has made it
O(n). Remove this checking.
The checking certainly looks redundant, I wouldn't say ill-formed
though (that's a formal term in the C++ standard meaning the code
isn't valid C++).
Since assert_valid also checks if (*this) is a legal heap, we can
remove is_heap and the assertions using it completely.
The patch looks good, and since you're just removing code I don't
think we need a copyright assignment. I'll get this applied to the
active branches, thanks!