[Bug libstdc++/113159] More robust std::sort for silly comparator functions
ygribov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Dec 22 07:27:06 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113159
--- Comment #14 from Yury Gribov <ygribov at gcc dot gnu.org> ---
(In reply to Xi Ruoyao from comment #12)
> Also note even
>
> bool cmp(Element a, Element b) { return false; }
>
> is a *valid* comparator, per the standard.
Hm, doesn't it violate the asymmetry axiom (cmp(x, y) => !cmp(y, x)) ?
More information about the Gcc-bugs
mailing list