[#bsl-list-054-merge-04]
= xref:bsl.adoc[bsl]::xref:bsl/list-054.adoc[list]::merge
:relfileprefix: ../../
:mrdocs:

Merge the specified sorted `other` list into this sorted list&period;

== Synopsis

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

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

== Description

This method has no effect if `other` is this list&semi; otherwise, `other` is left empty&period; The behavior is undefined unless both `other` and this list are sorted in non&hyphen;decreasing order according to the ordering provided by `operator&lt;`, and unless both `other` and this list use the same allocator&period; `operator&lt;` must define a strict weak ordering per `value&lowbar;type` (see &lcub;Comparators and Strict Weak Ordering&rcub;)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *other*
| sorted list to merge into this list
|===


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