[#bsl-list-054-sort-0a] = xref:bsl.adoc[bsl]::xref:bsl/list-054.adoc[list]::sort :relfileprefix: ../../ :mrdocs: Sort this list in non‐decreasing order according to the order provided by the specified `comparator` predicate. `comparator` must define a strict weak ordering over `value_type` (see []and Strict Weak Ordering)). The sort is stable, meaning that if `!comparator(a, b) && !comparator(b, a)`, then the ordering of elements `a` and `b` in the sequence is preserved. == Synopsis Declared in `<bslstl_list.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class COMPARE> void sort(COMPARE comparator); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#