且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是std :: list<> :: sort stable吗?

更新时间:2023-11-11 22:48:22

C ++标准ISO / IEC 14882:2003说:

C++ Standard ISO/IEC 14882:2003 says:


23.2.2.4/31

23.2.2.4/31

注意:稳定:保留等效元素的相对顺序。如果抛出异常,列表中元素的
顺序是不确定的。

Notes: Stable: the relative order of the equivalent elements is preserved. If an exception is thrown the order of the elements in the list is indeterminate.