[#bsl-list-054-sort-08]
= xref:bsl.adoc[bsl]::xref:bsl/list-054.adoc[list]::sort
:relfileprefix: ../../
:mrdocs:

`sort` overloads

== Synopses

Declared in `&lt;bslstl&lowbar;list&period;h&gt;`

Sort this list in non&hyphen;decreasing order using `operator&lt;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:bsl/list-054/sort-05.adoc[sort]();
----

[.small]#xref:bsl/list-054/sort-05.adoc[_» more&period;&period;&period;_]#

Sort this list in non&hyphen;decreasing order using the specified `comparator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class COMPARE&gt;
void
xref:bsl/list-054/sort-0a.adoc[sort](COMPARE comparator);
----

[.small]#xref:bsl/list-054/sort-0a.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *comparator*
| binary predicate defining the sort order
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
