cpp/utility/functional/boyer moore searcher

A searcher suitable for use with the overload of std that implements the.

is and.

must meet the requirements of.

Member functions
{{member|{{small|std::boyer_moore_searcher::}}boyer_moore_searcher|2= {{dcl begin}} {{dcl|1= boyer_moore_searcher( RandomIt1 pat_first,                     RandomIt1 pat_last,                      Hash hf = Hash,                      BinaryPredicate pred = BinaryPredicate ); }} {{dcl end}} Constructs a {{tt|std::boyer_moore_searcher}} by storing copies of {{c|pat_first}}, {{c|pat_last}}, {{c|hf}}, and {{c|pred}}, setting up any necessary internal data structures.

The value type of {{tt|RandomIt1}} must be {{named req|DefaultConstructible}}, {{named req|CopyConstructible}} and {{named req|CopyAssignable}}.

For any two values {{tt|A}} and {{tt|B}} of the type {{c|std::iterator_traits::value_type}}, if {{c|1= pred(A, B) == true}}, then {{c|1= hf(A) == hf(B)}} shall be {{c|true}}.

Exceptions
Any exceptions thrown by May also throw std if additional memory required for internal data structures cannot be allocated. }}
 * the copy constructor of ;
 * the default constructor, copy constructor, and copy assignment operator of the value type of ; or
 * the copy constructor and function call operator of or.

{{member|{{small|std::boyer_moore_searcher::}}operator|2= {{dcl begin}} {{dcl|since=c++17| template< class RandomIt2 > std::pair operator( RandomIt2 first, RandomIt2 last ) const; }} {{dcl end}} The member function called by the Searcher overload of {{lc|std::search}} to perform a search with this searcher. {{tt|RandomIt2}} must meet the requirements of {{named req|RandomAccessIterator}}.

and {{tt|RandomIt2}} must have the same value type.

Return value
If the pattern is empty, returns.

Otherwise, returns a pair of iterators to the first and one past last positions in where a subsequence that compares equal to  as defined by  is located, or  otherwise. }}