[#BloombergLP-bslstl-BoyerMooreHorspoolSearcher-2constructor-0c1] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/BoyerMooreHorspoolSearcher.adoc[BoyerMooreHorspoolSearcher]::BoyerMooreHorspoolSearcher :relfileprefix: ../../../ :mrdocs: Create a searcher by moving from `original` using `basicAllocator`. == Synopsis Declared in `<bslstl_boyermoorehorspoolsearcher.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- BoyerMooreHorspoolSearcher( xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<BoyerMooreHorspoolSearcher>] original, xref:BloombergLP/bslma/Allocator.adoc[BloombergLP::bslma::Allocator]* basicAllocator); ---- == Description The new object has the same state ‐‐ `needleFirst()`, `needleLast()`, `hash()`, and `equal()` ‐‐ as `original`. The specified `basicAllocator` is used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. The state of `original` is moved (in constant time) to the new searcher if `basicAllocator == original.allocator()`, and is move‐inserted (in linear time) using `basicAllocator` otherwise. The `original` object is left in an unspecified (valid) state. == Parameters [cols="1,4"] |=== | Name| Description | *original* | searcher whose state to move from | *basicAllocator* | memory allocator; null uses the default |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#