bsl::list::merge

Merge sorted other into this list using the specified comparator.

Synopsis

Declared in <bslstl_list.h>

template<class COMPARE>
void
merge(
    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

NameDescription
othersorted list to merge into this list
comparatorbinary predicate used to order elements