Overload of c_merge() for performing a comp comparison other than the default operator<.

Synopsis

Declared in <absl/algorithm/container.h>

template<
    typename C1,
    typename C2,
    typename OutputIterator,
    typename LessThan>
constexpr
OutputIterator
c_merge(
    C1 const& c1,
    C2 const& c2,
    OutputIterator result,
    LessThan&& comp);

Return Value

An iterator to the end of the merged range in the output.

Parameters

Name

Description

c1

The first sorted container.

c2

The second sorted container.

result

The output iterator receiving the merged elements.

comp

The comparison used to order the elements.

Created with MrDocs