"Strict Weak Ordering"概念:
Binary function that accepts two elements in the range as arguments,
and returns a value convertible to bool. The value returned indicates
whether the element passed as first argument is considered to go before
the second in the specific strict weak ordering it defines.
里面提到了"Strict Weak Ordering"的概念,它要求必须满足以下的条件:
(1)反自反性:即comp(x, x)必须是false
(2)非对称性:即若comp(x, y)和comp(y, x),其结果必然相反
(3)可传递性:即若comp(x, y)为true, comp(y, z)为true,那么comp(x, z)必然为true
csdn,
https://blog.csdn.net/hongwang0506/article/details/120048782
cplusplus, https://www.cplusplus.com/reference/algorithm/stable_sort/
《Effective STL》 条款21: 永远让比较函数对相等的值返回false
SGI-STL, http://www.sgi.com/tech/stl/StrictWeakOrdering.html