[#bsl-slist-sort-0a1]
= xref:bsl.adoc[bsl]::xref:bsl/slist.adoc[slist]::sort
:relfileprefix: ../../
:mrdocs:

`sort` overloads

== Synopses

Declared in `&lt;bslstp&lowbar;slist&period;h&gt;`

Sort the elements of this list into ascending order&period;


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

[.small]#xref:bsl/slist/sort-01.adoc[_» more&period;&period;&period;_]#

Sort this list using the specified strict&hyphen;weak&hyphen;ordering comparator `&lowbar;&lowbar;comp`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class &lowbar;StrictWeakOrdering&gt;
void
xref:bsl/slist/sort-0a7.adoc[sort](&lowbar;StrictWeakOrdering &lowbar;&lowbar;comp);
----

[.small]#xref:bsl/slist/sort-0a7.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *&lowbar;&lowbar;comp*
| strict weak ordering used to compare elements
|===


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