This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++17 status.
Section: 18.104.22.168 [list.ops] Status: C++17 Submitter: Tim Song Opened: 2016-11-16 Last modified: 2017-07-30
View all other issues in [list.ops].
View all issues with C++17 status.
Sometime between N1638 and N1804 the sentence "If an exception is thrown the order of the elements in the list is indeterminate." in the specification of list::sort went missing. This suspiciously coincided with the editorial change that "consolidated definitions of "Stable" in the library clauses" (N1805).forward_list::sort says that "If an exception is thrown the order of the elements in *this is unspecified"; list::sort should do the same.
This wording is relative to N4606.
Edit 22.214.171.124 [list.ops] p29 as indicated:
void sort(); template <class Compare> void sort(Compare comp);
-28- Requires: operator< (for the first version) or comp (for the second version) shall define a strict weak ordering (25.8 [alg.sorting]).-29- Effects: Sorts the list according to the operator< or a Compare function object. Does not affect the validity of iterators and references. […]