[Bug libstdc++/58562] std::sort fails with -D_GLIBCXX_DEBUG enabled, whose bug?
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Sep 29 14:59:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58562
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Specifically it fails this requirement:
matrixVectorProdTerm a(1, 0, 0);
matrixVectorProdTerm b(0, 1, 0);
assert( !(a<b && b<a) );
i.e. with your definition of ordering two objects can both be less than each
other, which makes the ordering unsuitable for std::sort (or pretty much
anything else in the standard library that cares about sorting.)
More information about the Gcc-bugs
mailing list