libstdc++
Non-Mutating
Collaboration diagram for Non-Mutating:

Functions

template<typename _ForwardIterator >
constexpr _ForwardIterator std::adjacent_find (_ForwardIterator __first, _ForwardIterator __last)
 
template<typename _ForwardIterator , typename _BinaryPredicate >
constexpr _ForwardIterator std::adjacent_find (_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __binary_pred)
 
template<typename _InputIterator , typename _Predicate >
constexpr bool std::all_of (_InputIterator __first, _InputIterator __last, _Predicate __pred)
 
template<typename _InputIterator , typename _Predicate >
constexpr bool std::any_of (_InputIterator __first, _InputIterator __last, _Predicate __pred)
 
template<typename _InputIterator , typename _Tp >
constexpr iterator_traits< _InputIterator >::difference_type std::count (_InputIterator __first, _InputIterator __last, const _Tp &__value)
 
template<typename _InputIterator , typename _Predicate >
constexpr iterator_traits< _InputIterator >::difference_type std::count_if (_InputIterator __first, _InputIterator __last, _Predicate __pred)
 
template<typename _II1 , typename _II2 >
constexpr bool std::equal (_II1 __first1, _II1 __last1, _II2 __first2)
 
template<typename _II1 , typename _II2 >
constexpr bool std::equal (_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2)
 
template<typename _IIter1 , typename _IIter2 , typename _BinaryPredicate >
constexpr bool std::equal (_IIter1 __first1, _IIter1 __last1, _IIter2 __first2, _BinaryPredicate __binary_pred)
 
template<typename _IIter1 , typename _IIter2 , typename _BinaryPredicate >
constexpr bool std::equal (_IIter1 __first1, _IIter1 __last1, _IIter2 __first2, _IIter2 __last2, _BinaryPredicate __binary_pred)
 
template<typename _InputIterator , typename _Tp >
constexpr _InputIterator std::find (_InputIterator __first, _InputIterator __last, const _Tp &__val)
 
template<typename _ForwardIterator1 , typename _ForwardIterator2 >
constexpr _ForwardIterator1 std::find_end (_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2)
 
template<typename _ForwardIterator1 , typename _ForwardIterator2 , typename _BinaryPredicate >
constexpr _ForwardIterator1 std::find_end (_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __comp)
 
template<typename _InputIterator , typename _ForwardIterator >
constexpr _InputIterator std::find_first_of (_InputIterator __first1, _InputIterator __last1, _ForwardIterator __first2, _ForwardIterator __last2)
 
template<typename _InputIterator , typename _ForwardIterator , typename _BinaryPredicate >
constexpr _InputIterator std::find_first_of (_InputIterator __first1, _InputIterator __last1, _ForwardIterator __first2, _ForwardIterator __last2, _BinaryPredicate __comp)
 
template<typename _InputIterator , typename _Predicate >
constexpr _InputIterator std::find_if (_InputIterator __first, _InputIterator __last, _Predicate __pred)
 
template<typename _InputIterator , typename _Predicate >
constexpr _InputIterator std::find_if_not (_InputIterator __first, _InputIterator __last, _Predicate __pred)
 
template<typename _InputIterator , typename _Function >
constexpr _Function std::for_each (_InputIterator __first, _InputIterator __last, _Function __f)
 
template<typename _InputIterator , typename _Size , typename _Function >
constexpr _InputIterator std::for_each_n (_InputIterator __first, _Size __n, _Function __f)
 
template<typename _ForwardIterator1 , typename _ForwardIterator2 >
constexpr bool std::is_permutation (_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2)
 
template<typename _ForwardIterator1 , typename _ForwardIterator2 , typename _BinaryPredicate >
constexpr bool std::is_permutation (_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _BinaryPredicate __pred)
 
template<typename _ForwardIterator1 , typename _ForwardIterator2 >
constexpr bool std::is_permutation (_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2)
 
template<typename _ForwardIterator1 , typename _ForwardIterator2 , typename _BinaryPredicate >
constexpr bool std::is_permutation (_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __pred)
 
template<typename _InputIterator1 , typename _InputIterator2 >
constexpr pair< _InputIterator1, _InputIterator2 > std::mismatch (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2)
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _BinaryPredicate >
constexpr pair< _InputIterator1, _InputIterator2 > std::mismatch (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __binary_pred)
 
template<typename _InputIterator1 , typename _InputIterator2 >
constexpr pair< _InputIterator1, _InputIterator2 > std::mismatch (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2)
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _BinaryPredicate >
constexpr pair< _InputIterator1, _InputIterator2 > std::mismatch (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _BinaryPredicate __binary_pred)
 
template<typename _InputIterator , typename _Predicate >
constexpr bool std::none_of (_InputIterator __first, _InputIterator __last, _Predicate __pred)
 
template<typename _ForwardIterator1 , typename _ForwardIterator2 >
constexpr _ForwardIterator1 std::search (_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2)
 
template<typename _ForwardIterator1 , typename _ForwardIterator2 , typename _BinaryPredicate >
constexpr _ForwardIterator1 std::search (_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __predicate)
 
template<typename _ForwardIterator , typename _Integer , typename _Tp >
constexpr _ForwardIterator std::search_n (_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp &__val)
 
template<typename _ForwardIterator , typename _Integer , typename _Tp , typename _BinaryPredicate >
constexpr _ForwardIterator std::search_n (_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp &__val, _BinaryPredicate __binary_pred)
 

Detailed Description

Function Documentation

◆ adjacent_find() [1/2]

template<typename _ForwardIterator >
constexpr _ForwardIterator std::adjacent_find ( _ForwardIterator  __first,
_ForwardIterator  __last 
)
inlineconstexpr

Find two adjacent values in a sequence that are equal.

Parameters
__firstA forward iterator.
__lastA forward iterator.
Returns
The first iterator i such that i and i+1 are both valid iterators in [__first,__last) and such that *i == *(i+1), or __last if no such iterator exists.

Definition at line 3974 of file stl_algo.h.

◆ adjacent_find() [2/2]

template<typename _ForwardIterator , typename _BinaryPredicate >
constexpr _ForwardIterator std::adjacent_find ( _ForwardIterator  __first,
_ForwardIterator  __last,
_BinaryPredicate  __binary_pred 
)
inlineconstexpr

Find two adjacent values in a sequence using a predicate.

Parameters
__firstA forward iterator.
__lastA forward iterator.
__binary_predA binary predicate.
Returns
The first iterator i such that i and i+1 are both valid iterators in [__first,__last) and such that __binary_pred(i,(i+1)) is true, or __last if no such iterator exists.

Definition at line 4000 of file stl_algo.h.

◆ all_of()

template<typename _InputIterator , typename _Predicate >
constexpr bool std::all_of ( _InputIterator  __first,
_InputIterator  __last,
_Predicate  __pred 
)
inlineconstexpr

Checks that a predicate is true for all the elements of a sequence.

Parameters
__firstAn input iterator.
__lastAn input iterator.
__predA predicate.
Returns
True if the check is true, false otherwise.

Returns true if __pred is true for each element in the range [__first,__last), and false otherwise.

Definition at line 455 of file stl_algo.h.

◆ any_of()

template<typename _InputIterator , typename _Predicate >
constexpr bool std::any_of ( _InputIterator  __first,
_InputIterator  __last,
_Predicate  __pred 
)
inlineconstexpr

Checks that a predicate is true for at least one element of a sequence.

Parameters
__firstAn input iterator.
__lastAn input iterator.
__predA predicate.
Returns
True if the check is true, false otherwise.

Returns true if an element exists in the range [__first,__last) such that __pred is true, and false otherwise.

Definition at line 492 of file stl_algo.h.

◆ count()

template<typename _InputIterator , typename _Tp >
constexpr iterator_traits<_InputIterator>::difference_type std::count ( _InputIterator  __first,
_InputIterator  __last,
const _Tp &  __value 
)
inlineconstexpr

Count the number of copies of a value in a sequence.

Parameters
__firstAn input iterator.
__lastAn input iterator.
__valueThe value to be counted.
Returns
The number of iterators i in the range [__first,__last) for which *i == __value

Definition at line 4026 of file stl_algo.h.

◆ count_if()

template<typename _InputIterator , typename _Predicate >
constexpr iterator_traits<_InputIterator>::difference_type std::count_if ( _InputIterator  __first,
_InputIterator  __last,
_Predicate  __pred 
)
inlineconstexpr

Count the elements of a sequence for which a predicate is true.

Parameters
__firstAn input iterator.
__lastAn input iterator.
__predA predicate.
Returns
The number of iterators i in the range [__first,__last) for which __pred(*i) is true.

Definition at line 4050 of file stl_algo.h.

◆ equal() [1/4]

template<typename _II1 , typename _II2 >
constexpr bool std::equal ( _II1  __first1,
_II1  __last1,
_II2  __first2 
)
inlineconstexpr

Tests a range for element-wise equality.

Parameters
__first1An input iterator.
__last1An input iterator.
__first2An input iterator.
Returns
A boolean true or false.

This compares the elements of two ranges using == and returns true or false depending on whether all of the corresponding elements of the ranges are equal.

Definition at line 1545 of file stl_algobase.h.

◆ equal() [2/4]

template<typename _II1 , typename _II2 >
constexpr bool std::equal ( _II1  __first1,
_II1  __last1,
_II2  __first2,
_II2  __last2 
)
inlineconstexpr

Tests a range for element-wise equality.

Parameters
__first1An input iterator.
__last1An input iterator.
__first2An input iterator.
__last2An input iterator.
Returns
A boolean true or false.

This compares the elements of two ranges using == and returns true or false depending on whether all of the corresponding elements of the ranges are equal.

Definition at line 1666 of file stl_algobase.h.

◆ equal() [3/4]

template<typename _IIter1 , typename _IIter2 , typename _BinaryPredicate >
constexpr bool std::equal ( _IIter1  __first1,
_IIter1  __last1,
_IIter2  __first2,
_BinaryPredicate  __binary_pred 
)
inlineconstexpr

Tests a range for element-wise equality.

Parameters
__first1An input iterator.
__last1An input iterator.
__first2An input iterator.
__binary_predA binary predicate functor.
Returns
A boolean true or false.

This compares the elements of two ranges using the binary_pred parameter, and returns true or false depending on whether all of the corresponding elements of the ranges are equal.

Definition at line 1576 of file stl_algobase.h.

◆ equal() [4/4]

template<typename _IIter1 , typename _IIter2 , typename _BinaryPredicate >
constexpr bool std::equal ( _IIter1  __first1,
_IIter1  __last1,
_IIter2  __first2,
_IIter2  __last2,
_BinaryPredicate  __binary_pred 
)
inlineconstexpr

Tests a range for element-wise equality.

Parameters
__first1An input iterator.
__last1An input iterator.
__first2An input iterator.
__last2An input iterator.
__binary_predA binary predicate functor.
Returns
A boolean true or false.

This compares the elements of two ranges using the binary_pred parameter, and returns true or false depending on whether all of the corresponding elements of the ranges are equal.

Definition at line 1699 of file stl_algobase.h.

◆ find()

template<typename _InputIterator , typename _Tp >
constexpr _InputIterator std::find ( _InputIterator  __first,
_InputIterator  __last,
const _Tp &  __val 
)
inlineconstexpr

Find the first occurrence of a value in a sequence.

Parameters
__firstAn input iterator.
__lastAn input iterator.
__valThe value to find.
Returns
The first iterator i in the range [__first,__last) such that *i == __val, or __last if no such iterator exists.

Definition at line 3843 of file stl_algo.h.

◆ find_end() [1/2]

template<typename _ForwardIterator1 , typename _ForwardIterator2 >
constexpr _ForwardIterator1 std::find_end ( _ForwardIterator1  __first1,
_ForwardIterator1  __last1,
_ForwardIterator2  __first2,
_ForwardIterator2  __last2 
)
inlineconstexpr

Find last matching subsequence in a sequence.

Parameters
__first1Start of range to search.
__last1End of range to search.
__first2Start of sequence to match.
__last2End of sequence to match.
Returns
The last iterator i in the range [__first1,__last1-(__last2-__first2)) such that *(i+N) == *(__first2+N) for each N in the range [0,__last2-__first2), or __last1 if no such iterator exists.

Searches the range [__first1,__last1) for a sub-sequence that compares equal value-by-value with the sequence given by [__first2,__last2) and returns an iterator to the __first element of the sub-sequence, or __last1 if the sub-sequence is not found. The sub-sequence will be the last such subsequence contained in [__first1,__last1).

Because the sub-sequence must lie completely within the range [__first1,__last1) it must start at a position less than __last1-(__last2-__first2) where __last2-__first2 is the length of the sub-sequence. This means that the returned iterator i will be in the range [__first1,__last1-(__last2-__first2))

Definition at line 370 of file stl_algo.h.

◆ find_end() [2/2]

template<typename _ForwardIterator1 , typename _ForwardIterator2 , typename _BinaryPredicate >
constexpr _ForwardIterator1 std::find_end ( _ForwardIterator1  __first1,
_ForwardIterator1  __last1,
_ForwardIterator2  __first2,
_ForwardIterator2  __last2,
_BinaryPredicate  __comp 
)
inlineconstexpr

Find last matching subsequence in a sequence using a predicate.

Parameters
__first1Start of range to search.
__last1End of range to search.
__first2Start of sequence to match.
__last2End of sequence to match.
__compThe predicate to use.
Returns
The last iterator i in the range [__first1,__last1-(__last2-__first2)) such that predicate(*(i+N), (__first2+N)) is true for each N in the range [0,__last2-__first2), or __last1 if no such iterator exists.

Searches the range [__first1,__last1) for a sub-sequence that compares equal value-by-value with the sequence given by [__first2,__last2) using comp as a predicate and returns an iterator to the first element of the sub-sequence, or __last1 if the sub-sequence is not found. The sub-sequence will be the last such subsequence contained in [__first,__last1).

Because the sub-sequence must lie completely within the range [__first1,__last1) it must start at a position less than __last1-(__last2-__first2) where __last2-__first2 is the length of the sub-sequence. This means that the returned iterator i will be in the range [__first1,__last1-(__last2-__first2))

Definition at line 420 of file stl_algo.h.

◆ find_first_of() [1/2]

template<typename _InputIterator , typename _ForwardIterator >
constexpr _InputIterator std::find_first_of ( _InputIterator  __first1,
_InputIterator  __last1,
_ForwardIterator  __first2,
_ForwardIterator  __last2 
)
constexpr

Find element from a set in a sequence.

Parameters
__first1Start of range to search.
__last1End of range to search.
__first2Start of match candidates.
__last2End of match candidates.
Returns
The first iterator i in the range [__first1,__last1) such that *i == *(i2) such that i2 is an iterator in [__first2,__last2), or __last1 if no such iterator exists.

Searches the range [__first1,__last1) for an element that is equal to some element in the range [__first2,__last2). If found, returns an iterator in the range [__first1,__last1), otherwise returns __last1.

Definition at line 3900 of file stl_algo.h.

◆ find_first_of() [2/2]

template<typename _InputIterator , typename _ForwardIterator , typename _BinaryPredicate >
constexpr _InputIterator std::find_first_of ( _InputIterator  __first1,
_InputIterator  __last1,
_ForwardIterator  __first2,
_ForwardIterator  __last2,
_BinaryPredicate  __comp 
)
constexpr

Find element from a set in a sequence using a predicate.

Parameters
__first1Start of range to search.
__last1End of range to search.
__first2Start of match candidates.
__last2End of match candidates.
__compPredicate to use.
Returns
The first iterator i in the range [__first1,__last1) such that comp(*i, *(i2)) is true and i2 is an iterator in [__first2,__last2), or __last1 if no such iterator exists.

Searches the range [__first1,__last1) for an element that is equal to some element in the range [__first2,__last2). If found, returns an iterator in the range [__first1,__last1), otherwise returns __last1.

Definition at line 3942 of file stl_algo.h.

◆ find_if()

template<typename _InputIterator , typename _Predicate >
constexpr _InputIterator std::find_if ( _InputIterator  __first,
_InputIterator  __last,
_Predicate  __pred 
)
inlineconstexpr

Find the first element in a sequence for which a predicate is true.

Parameters
__firstAn input iterator.
__lastAn input iterator.
__predA predicate.
Returns
The first iterator i in the range [__first,__last) such that __pred(*i) is true, or __last if no such iterator exists.

Definition at line 3868 of file stl_algo.h.

Referenced by std::none_of().

◆ find_if_not()

template<typename _InputIterator , typename _Predicate >
constexpr _InputIterator std::find_if_not ( _InputIterator  __first,
_InputIterator  __last,
_Predicate  __pred 
)
inlineconstexpr

Find the first element in a sequence for which a predicate is false.

Parameters
__firstAn input iterator.
__lastAn input iterator.
__predA predicate.
Returns
The first iterator i in the range [__first,__last) such that __pred(*i) is false, or __last if no such iterator exists.

Definition at line 508 of file stl_algo.h.

◆ for_each()

template<typename _InputIterator , typename _Function >
constexpr _Function std::for_each ( _InputIterator  __first,
_InputIterator  __last,
_Function  __f 
)
constexpr

Apply a function to every element of a sequence.

Parameters
__firstAn input iterator.
__lastAn input iterator.
__fA unary function object.
Returns
__f

Applies the function object __f to each element in the range [first,last). __f must not modify the order of the sequence. If __f has a return value it is ignored.

Definition at line 3781 of file stl_algo.h.

◆ for_each_n()

template<typename _InputIterator , typename _Size , typename _Function >
constexpr _InputIterator std::for_each_n ( _InputIterator  __first,
_Size  __n,
_Function  __f 
)
constexpr

Apply a function to every element of a sequence.

Parameters
__firstAn input iterator.
__nA value convertible to an integer.
__fA unary function object.
Returns
__first+__n

Applies the function object __f to each element in the range [first, first+n). __f must not modify the order of the sequence. If __f has a return value it is ignored.

Definition at line 3807 of file stl_algo.h.

References std::move().

◆ is_permutation() [1/4]

template<typename _ForwardIterator1 , typename _ForwardIterator2 >
constexpr bool std::is_permutation ( _ForwardIterator1  __first1,
_ForwardIterator1  __last1,
_ForwardIterator2  __first2 
)
inlineconstexpr

Checks whether a permutation of the second sequence is equal to the first sequence.

Parameters
__first1Start of first range.
__last1End of first range.
__first2Start of second range.
Returns
true if there exists a permutation of the elements in the range [__first2, __first2 + (__last1 - __first1)), beginning with ForwardIterator2 begin, such that equal(__first1, __last1, begin) returns true; otherwise, returns false.

Definition at line 2202 of file stl_algobase.h.

◆ is_permutation() [2/4]

template<typename _ForwardIterator1 , typename _ForwardIterator2 , typename _BinaryPredicate >
constexpr bool std::is_permutation ( _ForwardIterator1  __first1,
_ForwardIterator1  __last1,
_ForwardIterator2  __first2,
_BinaryPredicate  __pred 
)
inlineconstexpr

Checks whether a permutation of the second sequence is equal to the first sequence.

Parameters
__first1Start of first range.
__last1End of first range.
__first2Start of second range.
__predA binary predicate.
Returns
true if there exists a permutation of the elements in the range [__first2, __first2 + (__last1 - __first1)), beginning with ForwardIterator2 begin, such that equal(__first1, __last1, __begin, __pred) returns true; otherwise, returns false.

Definition at line 3470 of file stl_algo.h.

◆ is_permutation() [3/4]

template<typename _ForwardIterator1 , typename _ForwardIterator2 >
constexpr bool std::is_permutation ( _ForwardIterator1  __first1,
_ForwardIterator1  __last1,
_ForwardIterator2  __first2,
_ForwardIterator2  __last2 
)
inlineconstexpr

Checks whether a permutaion of the second sequence is equal to the first sequence.

Parameters
__first1Start of first range.
__last1End of first range.
__first2Start of second range.
__last2End of first range.
Returns
true if there exists a permutation of the elements in the range [__first2, __last2), beginning with ForwardIterator2 begin, such that equal(__first1, __last1, begin) returns true; otherwise, returns false.

Definition at line 3564 of file stl_algo.h.

◆ is_permutation() [4/4]

template<typename _ForwardIterator1 , typename _ForwardIterator2 , typename _BinaryPredicate >
constexpr bool std::is_permutation ( _ForwardIterator1  __first1,
_ForwardIterator1  __last1,
_ForwardIterator2  __first2,
_ForwardIterator2  __last2,
_BinaryPredicate  __pred 
)
inlineconstexpr

Checks whether a permutation of the second sequence is equal to the first sequence.

Parameters
__first1Start of first range.
__last1End of first range.
__first2Start of second range.
__last2End of first range.
__predA binary predicate.
Returns
true if there exists a permutation of the elements in the range [__first2, __last2), beginning with ForwardIterator2 begin, such that equal(__first1, __last1, __begin, __pred) returns true; otherwise, returns false.

Definition at line 3593 of file stl_algo.h.

◆ mismatch() [1/4]

template<typename _InputIterator1 , typename _InputIterator2 >
constexpr pair<_InputIterator1, _InputIterator2> std::mismatch ( _InputIterator1  __first1,
_InputIterator1  __last1,
_InputIterator2  __first2 
)
inlineconstexpr

Finds the places in ranges which don't match.

Parameters
__first1An input iterator.
__last1An input iterator.
__first2An input iterator.
Returns
A pair of iterators pointing to the first mismatch.

This compares the elements of two ranges using == and returns a pair of iterators. The first iterator points into the first range, the second iterator points into the second range, and the elements pointed to by the iterators are not equal.

Definition at line 1906 of file stl_algobase.h.

◆ mismatch() [2/4]

template<typename _InputIterator1 , typename _InputIterator2 , typename _BinaryPredicate >
constexpr pair<_InputIterator1, _InputIterator2> std::mismatch ( _InputIterator1  __first1,
_InputIterator1  __last1,
_InputIterator2  __first2,
_BinaryPredicate  __binary_pred 
)
inlineconstexpr

Finds the places in ranges which don't match.

Parameters
__first1An input iterator.
__last1An input iterator.
__first2An input iterator.
__binary_predA binary predicate functor.
Returns
A pair of iterators pointing to the first mismatch.

This compares the elements of two ranges using the binary_pred parameter, and returns a pair of iterators. The first iterator points into the first range, the second iterator points into the second range, and the elements pointed to by the iterators are not equal.

Definition at line 1941 of file stl_algobase.h.

◆ mismatch() [3/4]

template<typename _InputIterator1 , typename _InputIterator2 >
constexpr pair<_InputIterator1, _InputIterator2> std::mismatch ( _InputIterator1  __first1,
_InputIterator1  __last1,
_InputIterator2  __first2,
_InputIterator2  __last2 
)
inlineconstexpr

Finds the places in ranges which don't match.

Parameters
__first1An input iterator.
__last1An input iterator.
__first2An input iterator.
__last2An input iterator.
Returns
A pair of iterators pointing to the first mismatch.

This compares the elements of two ranges using == and returns a pair of iterators. The first iterator points into the first range, the second iterator points into the second range, and the elements pointed to by the iterators are not equal.

Definition at line 1989 of file stl_algobase.h.

◆ mismatch() [4/4]

template<typename _InputIterator1 , typename _InputIterator2 , typename _BinaryPredicate >
constexpr pair<_InputIterator1, _InputIterator2> std::mismatch ( _InputIterator1  __first1,
_InputIterator1  __last1,
_InputIterator2  __first2,
_InputIterator2  __last2,
_BinaryPredicate  __binary_pred 
)
inlineconstexpr

Finds the places in ranges which don't match.

Parameters
__first1An input iterator.
__last1An input iterator.
__first2An input iterator.
__last2An input iterator.
__binary_predA binary predicate functor.
Returns
A pair of iterators pointing to the first mismatch.

This compares the elements of two ranges using the binary_pred parameter, and returns a pair of iterators. The first iterator points into the first range, the second iterator points into the second range, and the elements pointed to by the iterators are not equal.

Definition at line 2026 of file stl_algobase.h.

◆ none_of()

template<typename _InputIterator , typename _Predicate >
constexpr bool std::none_of ( _InputIterator  __first,
_InputIterator  __last,
_Predicate  __pred 
)
inlineconstexpr

Checks that a predicate is false for all the elements of a sequence.

Parameters
__firstAn input iterator.
__lastAn input iterator.
__predA predicate.
Returns
True if the check is true, false otherwise.

Returns true if __pred is false for each element in the range [__first,__last), and false otherwise.

Definition at line 473 of file stl_algo.h.

References std::find_if().

◆ search() [1/2]

template<typename _ForwardIterator1 , typename _ForwardIterator2 >
constexpr _ForwardIterator1 std::search ( _ForwardIterator1  __first1,
_ForwardIterator1  __last1,
_ForwardIterator2  __first2,
_ForwardIterator2  __last2 
)
inlineconstexpr

Search a sequence for a matching sub-sequence.

Parameters
__first1A forward iterator.
__last1A forward iterator.
__first2A forward iterator.
__last2A forward iterator.
Returns
The first iterator i in the range [__first1,__last1-(__last2-__first2)) such that *(i+N) == *(__first2+N) for each N in the range [0,__last2-__first2), or __last1 if no such iterator exists.

Searches the range [__first1,__last1) for a sub-sequence that compares equal value-by-value with the sequence given by [__first2,__last2) and returns an iterator to the first element of the sub-sequence, or __last1 if the sub-sequence is not found.

Because the sub-sequence must lie completely within the range [__first1,__last1) it must start at a position less than __last1-(__last2-__first2) where __last2-__first2 is the length of the sub-sequence.

This means that the returned iterator i will be in the range [__first1,__last1-(__last2-__first2))

Definition at line 4091 of file stl_algo.h.

◆ search() [2/2]

template<typename _ForwardIterator1 , typename _ForwardIterator2 , typename _BinaryPredicate >
constexpr _ForwardIterator1 std::search ( _ForwardIterator1  __first1,
_ForwardIterator1  __last1,
_ForwardIterator2  __first2,
_ForwardIterator2  __last2,
_BinaryPredicate  __predicate 
)
inlineconstexpr

Search a sequence for a matching sub-sequence using a predicate.

Parameters
__first1A forward iterator.
__last1A forward iterator.
__first2A forward iterator.
__last2A forward iterator.
__predicateA binary predicate.
Returns
The first iterator i in the range [__first1,__last1-(__last2-__first2)) such that __predicate(*(i+N),*(__first2+N)) is true for each N in the range [0,__last2-__first2), or __last1 if no such iterator exists.

Searches the range [__first1,__last1) for a sub-sequence that compares equal value-by-value with the sequence given by [__first2,__last2), using __predicate to determine equality, and returns an iterator to the first element of the sub-sequence, or __last1 if no such iterator exists.

See also
search(_ForwardIter1, _ForwardIter1, _ForwardIter2, _ForwardIter2)

Definition at line 4132 of file stl_algo.h.

◆ search_n() [1/2]

template<typename _ForwardIterator , typename _Integer , typename _Tp >
constexpr _ForwardIterator std::search_n ( _ForwardIterator  __first,
_ForwardIterator  __last,
_Integer  __count,
const _Tp &  __val 
)
inlineconstexpr

Search a sequence for a number of consecutive values.

Parameters
__firstA forward iterator.
__lastA forward iterator.
__countThe number of consecutive values.
__valThe value to find.
Returns
The first iterator i in the range [__first,__last-__count) such that *(i+N) == __val for each N in the range [0,__count), or __last if no such iterator exists.

Searches the range [__first,__last) for count consecutive elements equal to __val.

Definition at line 4167 of file stl_algo.h.

◆ search_n() [2/2]

template<typename _ForwardIterator , typename _Integer , typename _Tp , typename _BinaryPredicate >
constexpr _ForwardIterator std::search_n ( _ForwardIterator  __first,
_ForwardIterator  __last,
_Integer  __count,
const _Tp &  __val,
_BinaryPredicate  __binary_pred 
)
inlineconstexpr

Search a sequence for a number of consecutive values using a predicate.

Parameters
__firstA forward iterator.
__lastA forward iterator.
__countThe number of consecutive values.
__valThe value to find.
__binary_predA binary predicate.
Returns
The first iterator i in the range [__first,__last-__count) such that __binary_pred(*(i+N),__val) is true for each N in the range [0,__count), or __last if no such iterator exists.

Searches the range [__first,__last) for __count consecutive elements for which the predicate returns true.

Definition at line 4202 of file stl_algo.h.