[#bsl-list-054-merge-09] = xref:bsl.adoc[bsl]::xref:bsl/list-054.adoc[list]::merge :relfileprefix: ../../ :mrdocs: Merge sorted `other` into this list using the specified `comparator`. == Synopsis Declared in `<bslstl_list.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class COMPARE> void merge( xref:bsl/list-054.adoc[list]& other, COMPARE comparator); ---- == Description This method has no effect if `other` is this list; otherwise, `other` is left empty. The behavior is undefined unless both `other` and this list are sorted in non‐decreasing order according to the ordering provided by `comparator`, and unless both `other` and this list use the same allocator. == Parameters [cols="1,4"] |=== | Name| Description | *other* | sorted list to merge into this list | *comparator* | binary predicate used to order elements |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#