[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: [Bug libstdc++/67085] priority queue should not copy comparators when calling push_heap and pop_heap
From: "konig121 at gmail dot com" <gcc-bugzilla () gcc ! gnu ! org>
Date: 2015-07-31 19:16:31
Message-ID: bug-67085-4-OTO5b1UCxj () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67085
Andrew Calcutt <konig121 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
--- Comment #1 from Andrew Calcutt <konig121 at gmail dot com> ---
The current implementation of push and company likely need to be updated to
specify that the comparator be passed by reference explicitly. For Example:
Before:
std::push_heap(c.begin(), c.end(), comp);
After:
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
std::push_heap<_Sequence::iterator,_Comp_ref>(c.begin(), c.end(), comp);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic