#include <bslstl_defaultsearcher.h>
◆ default_searcher() [1/3]
template<class ForwardIterator1 , class BinaryPredicate >
Create a default_searcher object that can search for the sequence of value_type
values found in the specified range [pat_first, pat_last)
. Optionally supply a pred
functor for use by operator()
. See {Comparator Requirements}. The behavior is undefined unless pat_first can be advanced to equal pat_last .
◆ default_searcher() [2/3]
template<class ForwardIterator1 , class BinaryPredicate = equal_to< typename bsl::iterator_traits<ForwardIterator1>::value_type>>
Create a default_searcher object having same state as the specified original
object.
◆ default_searcher() [3/3]
template<class ForwardIterator1 , class BinaryPredicate = equal_to< typename bsl::iterator_traits<ForwardIterator1>::value_type>>
Create a default_searcher object having same state as the specified original
object. by moving (in constant time) the state of original
to the new searcher. The original
object is left in an unspecified (valid) state.
◆ ~default_searcher()
template<class ForwardIterator1 , class BinaryPredicate = equal_to< typename bsl::iterator_traits<ForwardIterator1>::value_type>>
◆ operator()()
template<class ForwardIterator1 , class BinaryPredicate >
template<class ForwardIterator2 >
Search the specified range [first, last)
for the first sequence of value_type
values specified on construction. Return the range where those values are found, or the range [last, last)
if that sequence is not found. The search is performed using a "naive" algorithm that has time complexity of:
bsl::distance(pat_first, pat_last) * bsl::distance(first, last);
Values of the two sequences are compared using the equality comparison functor specified on construction. The behavior is undefined unless first
can be advanced to equal last
and the iterators used to construct this object are still valid. Note that if the sought sequence is empty, the range [first, first)
is returned. Also note that if the sequence sought is longer than the sequence searched – thus the sought sequence cannot be found – the range [last, last)
is returned.
◆ operator=() [1/2]
template<class ForwardIterator1 , class BinaryPredicate = equal_to< typename bsl::iterator_traits<ForwardIterator1>::value_type>>
Assign to this object the state of the specified rhs
object and return a non-const
reference to this searcher.
◆ operator=() [2/2]
template<class ForwardIterator1 , class BinaryPredicate = equal_to< typename bsl::iterator_traits<ForwardIterator1>::value_type>>
Assign to this object the state of the specified rhs
object, and return a non-const
reference to this searcher.
The documentation for this class was generated from the following file: