absl::c_mismatch

c_mismatch overloads

Synopses

Declared in <absl/algorithm/container.h>

Container-based version of the <algorithm> std::mismatch() function to return the first element where two ordered containers differ. Applies == to the first N elements of c1 and c2, where N = min(size(c1), size(c2)).

template<
    typename C1,
    typename C2>
constexpr
/* implementation-defined */
c_mismatch(
    C1& c1,
    C2& c2);
» more...

Overload of c_mismatch() for using a predicate evaluation other than == as the function's test condition. Applies pred to the first N elements of c1 and c2, where N = min(size(c1), size(c2)).

template<
    typename C1,
    typename C2,
    typename BinaryPredicate>
constexpr
/* implementation-defined */
c_mismatch(
    C1& c1,
    C2& c2,
    BinaryPredicate pred);
» more...

Return Value

A pair of iterators to the first mismatching elements of c1 and c2.

Parameters

NameDescription
c1The first container.
c2The second container.
predThe binary predicate used to compare elements.