c_contains_subrange overloads
Synopses
Declared in <absl/algorithm/container.h>
Container‐based version of the <algorithm> std::ranges::contains_subrange() C++23 function to search a container for a subsequence.
template<
typename Sequence1,
typename Sequence2>
constexpr
bool
c_contains_subrange(
Sequence1& sequence,
Sequence2& subsequence);
Overload of c_contains_subrange() for using a predicate evaluation other than == as the function's test condition.
template<
typename Sequence1,
typename Sequence2,
typename BinaryPredicate>
constexpr
bool
c_contains_subrange(
Sequence1& sequence,
Sequence2& subsequence,
BinaryPredicate&& pred);
Return Value
-
trueifsubsequenceis found withinsequence, otherwisefalse. -
trueifsubsequenceis found withinsequenceunderpred, otherwisefalse.
Parameters
Name |
Description |
sequence |
The container to search. |
subsequence |
The subsequence to search for. |
pred |
The binary predicate used to compare elements. |
Created with MrDocs