Overload of c_search_n() for using a predicate evaluation other than == as the function's test condition.

Synopsis

Declared in <absl/algorithm/container.h>

template<
    typename Sequence,
    typename Size,
    typename T,
    typename BinaryPredicate>
constexpr
/* implementation-defined */
c_search_n(
    Sequence& sequence,
    Size count,
    T&& value,
    BinaryPredicate&& pred);

Return Value

An iterator to the beginning of the found run, or the end iterator if none is found.

Parameters

Name

Description

sequence

The container to search.

count

The number of consecutive matching elements to search for.

value

The value each of the consecutive elements is compared against.

pred

The binary predicate used to compare elements.

Created with MrDocs