[Bug libstdc++/59391] std::sort will go out of std::vector bounds and crash
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 13 19:59:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59391
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|WORKSFORME |INVALID
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is not a valid strict weak ordering:
bool compare_val(int* a, int* b) {
if (*a <= *b) return true;
return false;
}
See https://www.sgi.com/tech/stl/StrictWeakOrdering.html
It fails the irreflexive and antisymmetric requirements.
More information about the Gcc-bugs
mailing list