This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31155] priority_queue sorts wrong with std::greater
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Mar 2007 20:05:48 -0000
- Subject: [Bug c++/31155] priority_queue sorts wrong with std::greater
- References: <bug-31155-14232@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pcarlini at suse dot de 2007-03-12 20:05 -------
This is how priority_queue works: it makes an "heap" (in the exact computer
science meaning), therefore, in particular, there is no guarantee that the
contents are all fully sorted, only that the smallest is the first one (the
largest with the default predicate).
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31155