[#BloombergLP-bslstl-DefaultSearcher]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::DefaultSearcher
:relfileprefix: ../../
:mrdocs:

Searcher functor using a naive sequential search for a fixed needle&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;defaultsearcher&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class FORWARD&lowbar;ITR&lowbar;NEEDLE,
    class EQUAL = xref:bsl/equal_to-0d.adoc[bsl::equal&lowbar;to&lt;bsl::iterator&lowbar;traits&lt;FORWARD&lowbar;ITR&lowbar;NEEDLE&gt;::value&lowbar;type&gt;]&gt;
class DefaultSearcher;
----

== Description

This class template defines functors that can search for the sequence of `value&lowbar;type` values defined on construction (i&period;e&period;, the &quot;needle&quot;) in sequences of `value&lowbar;type` values (i&period;e&period;, &quot;haystacks&quot;) passed to the functor&apos;s `operator()`&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/DefaultSearcher/2constructor.adoc[`DefaultSearcher`]         [.small]#[constructor]#
| Create a searcher for the needle `&lsqb;needleFirst, needleLast)&rsqb;`&period;
| xref:BloombergLP/bslstl/DefaultSearcher/equal.adoc[`equal`] 
| Return the functor used by this searcher object to compare `value&lowbar;type` values&period;
| xref:BloombergLP/bslstl/DefaultSearcher/needleFirst.adoc[`needleFirst`] 
| Return an iterator referring to the first element of the sequence of `value&lowbar;type` values that can be sought by this searcher object&period;
| xref:BloombergLP/bslstl/DefaultSearcher/needleLast.adoc[`needleLast`] 
| Return an iterator referring to one past the last element of the sequence of `value&lowbar;type` values that can be sought by this searcher object&period;
| xref:BloombergLP/bslstl/DefaultSearcher/operator_call.adoc[`operator()`] 
| Search `&lsqb;haystackFirst, haystackLast)&rsqb;` for the constructed pattern&period;
|===



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