[#absl-c_contains_subrange-07]
= xref:absl.adoc[absl]::c&lowbar;contains&lowbar;subrange
:relfileprefix: ../
:mrdocs:

`c&lowbar;contains&lowbar;subrange` overloads

== Synopses

Declared in `&lt;absl&sol;algorithm&sol;container&period;h&gt;`

Container&hyphen;based version of the &lt;algorithm&gt; `std&colon;&colon;ranges&colon;&colon;contains&lowbar;subrange()` C&plus;&plus;23 function to search a container for a subsequence&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Sequence1,
    typename Sequence2&gt;
constexpr
bool
xref:absl/c_contains_subrange-0e8.adoc[c&lowbar;contains&lowbar;subrange](
    Sequence1& sequence,
    Sequence2& subsequence);
----

[.small]#xref:absl/c_contains_subrange-0e8.adoc[_» more&period;&period;&period;_]#

Overload of `c&lowbar;contains&lowbar;subrange()` for using a predicate evaluation other than `&equals;&equals;` as the function&apos;s test condition&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Sequence1,
    typename Sequence2,
    typename BinaryPredicate&gt;
constexpr
bool
xref:absl/c_contains_subrange-0ea.adoc[c&lowbar;contains&lowbar;subrange](
    Sequence1& sequence,
    Sequence2& subsequence,
    BinaryPredicate&& pred);
----

[.small]#xref:absl/c_contains_subrange-0ea.adoc[_» more&period;&period;&period;_]#

== Return Value

* `true` if `subsequence` is found within `sequence`, otherwise `false`&period;
* `true` if `subsequence` is found within `sequence` under `pred`, otherwise `false`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *sequence*
| The container to search&period;
| *subsequence*
| The subsequence to search for&period;
| *pred*
| The binary predicate used to compare elements&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
